Page 1 of 1

flash maple board using st-link and Arduino generated .bin file?

Posted: Wed Apr 08, 2020 9:24 am
by Phono
I am investigating my problem that I describe in my previous topic here about compilation on Olimex (maple) board. For so, I have connected a st-link to my board, and I would like to directly flash the board with the .bin file last generated by the compilation in Arduino.
I did a try, but in my first attempt I left the start address at 8000000, and I erased the bootloader.
I fixed this by flashing the bootloader again, starting at 8000000.
I have tried to change the start address to 8005000 which is actually the first byte of the code when compiled specifying the use of a maple board. But the flashing fails.
So I would like to know how, or whether, it is possible to flash the generated .bin file while preserving the bootloader, and having it work just like it were flashed through the bootloader.

Re: flash maple board using st-link and Arduino generated .bin file?

Posted: Wed Apr 08, 2020 10:08 am
by fpiSTM
IIWR, you are currently on moving to the STM32 core ?
If so then you will have to create your own upload method for stlink to preserve the bootloader.
You will have also to redefine the VECT_TAB_OFFSET.
You can see how it is managed with the maple upload method.

Re: flash maple board using st-link and Arduino generated .bin file?

Posted: Wed Apr 08, 2020 7:06 pm
by stevestrong
When you upload with STLink the BIN compiled for bootloader, you still have to select the Stm32bootloader upload method in Arduino for the build process, otherwise it will be compiled with the wrong start address.