Porting Espruino to a new device #782
Replies: 9 comments
-
Posted at 2015-08-03 by @gfwilliams How you debug is going to depend on your board and processor. Ideally you'd have some kind of SWD/JTAG debugger that could could attach and use to step through your code, to check it's initialising properly. Failing that, make If you do need help it's possible I could do some consultancy work for you though. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-08-04 by mjdietz OK, my problem has been that after I compile system startup seems to work fine. It call SystemInit and this returns. Then it calls _start and the program crashes there before ever reaching main? Any clues about what could be going wrong here? If I keep CFLAGS, LDFLAGS, ARCHFLAGS etc... the same as you have it works but once I start using flags from Nordics example makefiles the code breaks. but ive been wondering if the way im compiling/linking is causing this. thanks, |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-08-05 by @gfwilliams To be honest it could be anything - it's not really an Espruino problem at all. It might help to figure out exactly how it's crashing. I'd step through All I can think right now is that |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-08-06 by mjdietz OK, found the problem. Some makefile/linkerscript problems. Got the bare bones working today though! Able to blink an LED from the chrome ide :) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-08-07 by @gfwilliams Wow, that's great! When you're happy with it, could you push your changes back on GitHub? It's be great to have a bit more platform support. If you're looking at adding BLE support at some point, it might be worth doing something similar to bleat - as that seems to be a relatively standard JS API now. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-08-07 by Pinnchus I would like to port it to STM32F405, should be an easy task but there is too many place with #define ... will try compiling as a PICO and change only linker file and mem. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-08-07 by @gfwilliams Yes, F405 should be pretty easy. No need to change the linker file as it's generated automatically from the details (RAM/Flash) in the BOARD.py file though. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-08-11 by mjdietz Going to make a pull request today. Also working on BLE support now but should have more details in pull request. Thanks for all the help so far! -Mike |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-08-11 by @gfwilliams Great, thanks! I look forward to it :) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-07-29 by mjdietz
OK so you import your devices library, write BOARD.py, modify the makefile and build_linker.py, and then implement jshardware.c / main.c. Finally you get it to compile for your board and it doesn't work at all. What now? How do you recommend troubleshooting/debugging espruino? What are some small steps I can break debugging into? (All im trying to do at this point is get my board talking to Espruino's web ide).
Beta Was this translation helpful? Give feedback.
All reactions