2020-10-26 08:09 AM
Hi,
i would like to execute command after i click the debug icon, but before the debug starts.
In particular:
Do you think it is possible? How can i do that?
Thank you in advance
2020-10-26 10:06 AM
Instead of post/pre build commands use CDT files makefile.init, makefile.defs and makefile.targets. For CRC you may add target to /makefile.targets (file must be created!):
CRC_Tool := 'C:\Tools\crc.exe'
crc: all
-@echo 'Calculating CRC'
$(CRC_Tool) $(wildcard *.bin)
Press Shift-F9, add target crc, execute crc
To debug application, you don't need a bootloader, CubeIDE will start application from ld flash address, but you have to add code to move the stack as first lines to main:
#define FLASH_START 0x800....
....
int main()
{
/* USER CODE BEGIN 1 */
__disable_irq();
SCB->VTOR = FLASH_START | VECT_TAB_OFFSET;
__DSB();
__enable_irq();
...
2020-10-29 03:46 AM
Hi, thanks for the answer.
It is not clear how i can create a CRC based on the binary file before i create that binary file. Are you sure is it possible with CDT files?
Regarding the debug: it is clear that if i launch debug from the IDE the debug and the application work. But if i reboot the board, the bootloader does not recognize the CRC of the application, and it won't start anymore.
2020-10-29 04:08 PM
crc: all
command(s)
This means: