I have some little background in MCU programming, but I’m not a great expert at it. I can build the firmware from sources using GCC. But if I decide to change it, what are the debugging techniques?
- In the best case, I would expect to have a visual IDE with debugger. But that requires physical debugging interface, such as SWD/JTAG. How can I get started with this? So far I have some experience with STM evaluation boards, they have done the hardware job.
- I may need dozens of Update/run/debug cyles. That will tear down the flash memory. Can I boot from UART? (Well, I’m sure the bootloader does not support this). Is there a bootloader source available? I have only 1.60 version, but my device is at 1.64.
- Maybe I can tweak the bootloader and run my custom binaries from RAM disk. But I need to be sure that I do not interfere with the main software. I need to read more about the “Slots” architecture, what lies behind it. As I see, most popular custom firmwares do work with slots. PAWN interpreter probably not enough for my plans - as I want to implement a usb protocol for remote control via bluetooth dongle.
Maybe I won’t need a usb protocol. I can start with existent mass storage protocol and just use an android smartphone via usb OTG. I saw that gabonator is adopting this approach.
I know the USB protocol is coded inside BIOS, so if I modify BIOS, that will change its layout in memory and therefore all other firmwares will become uncompatible with my BIOS version.
- Maybe I can take custom firmware code to my STM evaluation board. There I can have my own bootloader and implement stubs for interface peripheral calls, this will allow me to debug the firmware up to some extent.
I’m just looking for some guide, but I doubt it exists. Can anyone share the experience?