Hi Martin,
I thought you might be interested to know that I successfully ran the sample
program for the STM32L100C by following the instructions in the txt file from
the mseuniverse/samples/embedded/arm folder. It makes a very neat dev system!
I have also used mseide to compile, load and debug programs for an STM32F446
after changing the cross compiler for the M4 and modifying the project options
accordingly.
However, there is one odd thing which I hope you can help with. After building
the program it takes three sequences of target->continue before the program
successfully loads and runs. Specifically, the following is observed:-
(target->continue)
util 1.5.0
2018-08-28T14:47:30 INFO common.c: Loading device parameters....
2018-08-28T14:47:30 INFO common.c: Device connected is: F446 device, id
0x10006421
2018-08-28T14:47:30 INFO common.c: SRAM size: 0x20000 bytes (128 KiB), Flash:
0x80000 bytes (512 KiB) in pages of 131072 bytes
2018-08-28T14:47:30 INFO gdb-server.c: Chip ID is 00000421, Core ID is
2ba01477.
2018-08-28T14:47:30 INFO gdb-server.c: Listening at *:4242...
2018-08-28T14:47:32 INFO gdb-server.c: Found 6 hw breakpoint registers
2018-08-28T14:47:32 INFO gdb-server.c: GDB connected.
2018-08-28T14:47:34 INFO common.c: Attempting to write 16384 (0x4000) bytes to
stm32 address: 134217728 (0x8000000)
Flash page at addr: 0x08000000 erased
2018-08-28T14:47:34 INFO common.c: Finished erasing 1 pages of 16384 (0x4000)
bytes
2018-08-28T14:47:34 INFO common.c: Starting Flash write for F2/F4/L4
2018-08-28T14:47:34 INFO flash_loader.c: Successfully loaded flash loader in
sram
enabling 32-bit flash writes
size: 16384
2018-08-28T14:47:35 INFO common.c: Starting verification of write complete
2018-08-28T14:47:35 ERROR common.c: Verification of flash failed at offset: 0
(target->continue)
util 1.5.0
2018-08-28T14:52:00 INFO common.c: Loading device parameters....
2018-08-28T14:52:00 INFO common.c: Device connected is: F446 device, id
0x10006421
2018-08-28T14:52:00 INFO common.c: SRAM size: 0x20000 bytes (128 KiB), Flash:
0x80000 bytes (512 KiB) in pages of 131072 bytes
2018-08-28T14:52:00 INFO gdb-server.c: Chip ID is 00000421, Core ID is
2ba01477.
2018-08-28T14:52:00 INFO gdb-server.c: Listening at *:4242...
(target->continue)
util 1.5.0
2018-08-28T14:53:31 INFO common.c: Loading device parameters....
2018-08-28T14:53:31 INFO common.c: Device connected is: F446 device, id
0x10006421
2018-08-28T14:53:31 INFO common.c: SRAM size: 0x20000 bytes (128 KiB), Flash:
0x80000 bytes (512 KiB) in pages of 131072 bytes
2018-08-28T14:53:31 INFO gdb-server.c: Chip ID is 00000421, Core ID is
2ba01477.
2018-08-28T14:53:31 INFO gdb-server.c: Listening at *:4242...
2018-08-28T14:53:34 INFO gdb-server.c: Found 6 hw breakpoint registers
2018-08-28T14:53:34 INFO gdb-server.c: GDB connected.
2018-08-28T14:53:35 INFO common.c: Attempting to write 16384 (0x4000) bytes to
stm32 address: 134217728 (0x8000000)
Flash page at addr: 0x08000000 erased
2018-08-28T14:53:35 INFO common.c: Finished erasing 1 pages of 16384 (0x4000)
bytes
2018-08-28T14:53:35 INFO common.c: Starting Flash write for F2/F4/L4
2018-08-28T14:53:35 INFO flash_loader.c: Successfully loaded flash loader in
sram
enabling 32-bit flash writes
size: 16384
2018-08-28T14:53:36 INFO common.c: Starting verification of write complete
2018-08-28T14:53:36 INFO common.c: Flash written and verified! jolly good!
If I send the commands too quickly in succession gdb can get into a state where
a hardware reset is the only way to resume communication.
I wonder whether in general it is a timing issue eg. the write commands issued
to the stlink interface are sent too soon after the erase command (a 16k sector
erase takes 250->500 ms to execute), and then the debugger is getting out of
step.
any suggestions?
Geoffrey
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mseide-msegui-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk