I am just beginning my journey setting up a MySensors network using several HyTiny boards, and I want to keep debug ports running while debugging with my BMP — I see that to prevent disabling the debug ports I need to define CONFIG_MAPLE_MINI_NO_DISABLE_DEBUG when board.cpp is compiled. I’m assuming that this should be defined on the compiler command line so I don’t edit the file — what is the ‘best’ place to define such a conditional compilation #define when using the Arduino IDE? I’m wondering if there is a way to do it so that it is only defined when I choose the debug compilation option (-g) in the IDE?
Thanks & Best Regards,
Mitch
The specific flag is set in the environment here: https://github.com/rogerclarkmelbourne/ … boards.txt
For reference, we have several BMP folks in the forum, but I would expect that no one would be offended if I called Rick Kimball the resident expert on BMP as well as a many esoteric C++ topics. This link is an extension of Rick’s brain.
Ray
I appreciate the link to Rick’s information — clearly I have a lot of reading to do
It was just awesome to finally be able to single step through some code on the HyTiny board while viewing the source in GDB. I’ll take a look at Rick’s posts and see what new info I can glean from there.
Thanks again,
Mitch
Also, I generated an ELF file from the generic generic_boot20_hytiny.bin using arm-none-eabi-objcopy and reloading it with the BMP under GDB seems to work ‘sometimes’ — is there a way to load the bin file directly via the BMP that I should be doing? I messed up my st-link clone by foolishly letting the st.com software ‘upgrade’ its firmware and now it doesn’t seem to want to stay connected.
Thanks!
Mitch
[mitchmitchell – Thu Mar 15, 2018 9:23 pm] –
It seems that whenever I load a sketch using the black magic probe it wipes out the boot loader on the HyTiny board — is there a proper method to use the BMP to load a sketch that won’t destroy the boot loader?
That would be the expected outcome … that is, the BMP will upload the binary and overwrite the bootloader. There are serveral bootloaders, so only the sketch being loaded by the bootloader would be expected to “protect” the bootloader addresses.
[mitchmitchell – Thu Mar 15, 2018 9:23 pm] –
….is there a way to load the bin file directly via the BMP that I should be doing?
The WiKi has this to say (near bottom of page): http://wiki.stm32duino.com/index.php?ti … g_a_sketch
Sorry, that To-Be-Done will not help at the moment. Try searching on BMP using the “site:stm32duino.com” Google format.
Ray
[mitchmitchell – Thu Mar 15, 2018 10:18 pm] –
LOL — got me there! Uploading the elf manually with GDB works sometimes, and I’ve not figured out what makes the difference. I’ve got several replacement st-links on order but for now if I can’t find a way to recover the one I have I’ll be stuck for a few days.
This is Rick’s BMP thread, it may be useful: viewtopic.php?t=122
Has the in-silicon serial bootloader been “disabled” when you flashed with official software? I use serial all the time with Blue Pills and it works well.
Ray
If you are asking about the st-link clone, then I don’t know, I can see it as an st-link v2 on my linux laptop in /dev (a very slow dog 32 bit machine) but st-flash won’t acknowledge it. st-info –probe sees it though so I’m puzzled about what’s going on with that.
It does seem that it is possible to reflash the software for the stlink.
http://stm32duino.com/viewtopic.php?f=3&t=1625
and
http://wiki.stm32duino.com/index.php?ti … LINK_clone
So, perhaps you could restore the clone software. Or, perhaps you could flash BMP onto the adapter.
viewtopic.php?t=1744 assuming the uC has sufficient flash.
UPDATED…
You may also see how you can install the bootloader and a sketch from the console here:
https://github.com/rogerclarkmelbourne/ … from-Linux
1. I generated an ELF file from the generic_boot20_hytiny.bin using objcopy
arm-none-eabi-objcopy -I binary -O elf32-big generic_boot20_hytiny.bin generic_boot20_hytiny.elfhttps://www.google.com/search?q=arduino … mmand+line
Ray
btw have you rebuilt your kernel yet ?
first time i did, took 3.5hrs, last time source size 10 plus times larger and 5.5mins. and i can’t remember when last i did
srp
