Custom Firmware on Pyboard with Micropython Makefiles
Posted: Thu Nov 30, 2017 11:58 am
Hi all guys!
I'm a very happy Pyboard user!
Btw, I need to try (at least) to program the pyboard (which has an STM32F4) with a custom firmware written in C, since we have strict requirements on timing for an automotive application we are developing right now.
My main develoment environment is Linux, and my workflow heavily depens on CLI, so I'm interested in using the Makefile you provide togheter with the Micropython repo.
My question is: how can I modify the project in order to create my custom firmware and still use the tools you provide with Micropython for compiling, linking and flashing? I tried to compile some dummy projects (like the blinky one I found there) and to use the solution proposed at the beginning of this thread for .dfu files generation from .isr_routine and .text section of the bin file but with no success.
The pyboard doesn't seem to respond, or to change its behaviour. I've also tried to delve into the makefiles of the micropython repo in order to find what to remove in order to get my firmware loaded, but with no luck (it is something I'm not really able to do myself, given that I'm not really an expert in embedded programming and in makefiles too, even if I like them very much, to me they're very clever).
I think it is possible to do that, but I need some help in getting this thing done on the pyboard.
Also, it would be nice to find a way to also debug a running pyboard (with a custom firmware too) by using GDB or any similar debugger through the USB serial connection. I don't know anything about the feasibility of this solution, do you?
So if you can provide any hints, it would be undoubtedly helpful!
In the end if this would be possibile, I'd like to write some documentation in the wiki in order to make this useful thing available for others, too!
Thank you very much!
Giacomo
I'm a very happy Pyboard user!
Btw, I need to try (at least) to program the pyboard (which has an STM32F4) with a custom firmware written in C, since we have strict requirements on timing for an automotive application we are developing right now.
My main develoment environment is Linux, and my workflow heavily depens on CLI, so I'm interested in using the Makefile you provide togheter with the Micropython repo.
My question is: how can I modify the project in order to create my custom firmware and still use the tools you provide with Micropython for compiling, linking and flashing? I tried to compile some dummy projects (like the blinky one I found there) and to use the solution proposed at the beginning of this thread for .dfu files generation from .isr_routine and .text section of the bin file but with no success.
The pyboard doesn't seem to respond, or to change its behaviour. I've also tried to delve into the makefiles of the micropython repo in order to find what to remove in order to get my firmware loaded, but with no luck (it is something I'm not really able to do myself, given that I'm not really an expert in embedded programming and in makefiles too, even if I like them very much, to me they're very clever).
I think it is possible to do that, but I need some help in getting this thing done on the pyboard.
Also, it would be nice to find a way to also debug a running pyboard (with a custom firmware too) by using GDB or any similar debugger through the USB serial connection. I don't know anything about the feasibility of this solution, do you?
So if you can provide any hints, it would be undoubtedly helpful!
In the end if this would be possibile, I'd like to write some documentation in the wiki in order to make this useful thing available for others, too!
Thank you very much!
Giacomo