Dejan Deletic
Forum Replies Created
-
AuthorPosts
-
Dejan DeleticParticipant
Mike, Jason,
I power the EVB via USB. I am not aware of any power failures that may have caused flash memory contents loss. I did not knowingly erase flash contents either.
But it does appear to be corrupted. Here is trace level info of getInstance() call:
[ERROR] File from flash wrong size. Expected 256 – Actual 1024
[DEBUG] Defaulting protected settings.
[ERROR] File from flash wrong size. Expected 1024 – Actual 0
[DEBUG] Setting to defaults.
[DEBUG] Failed to file in flash.
[DEBUG] Session to defaults.I hope this helps us diagnose the problem, although I fear it is now too late for that.
Dejan DeleticParticipantI don’t see any device report errors other what I send to debug output. Perhaps I should try mDot bootloader on its own? Or look into TRACE_LEVEL logs?
- This reply was modified 8 years, 9 months ago by Dejan Deletic.
Dejan DeleticParticipantThat doesn’t answer any of my questions (other than the last one).
For now, I don’t really mind if one of my nodes has lost its ID, so long as I can be confident it is not going to happen once units are deployed. Re-programming it back to match what is printed on the sticker is low priority for me.
Dejan DeleticParticipantI just wanted to report back that I have managed to get EmBitz (formerly known as EmBlocks) to build, and debug via ST-Link.
Building part is straight forward – export your project from the online compiler for EmBlocks, open in EmBitz and build. This will create an ELF file which is fine for debugging, but not for copy onto MULTITECH virtual disk (if using EVB). To create a binary, similar to one provided by the online compiler, use ‘arm-none-eabi-objcopy -O binary <target.elf> <target.bin>’ post build step.
Debugging is a bit more involved. First, you need to let go of EVB and connect ST-Link directly to mDot using SWD pins.
– In EmBitz, go to ‘Debug :: Plugins :: SVD Repository’ and get device information file for ‘STMicro :: ST32F411xx’ device so that the system knows how to interact with the microcontroller.
– Then configure ‘Debug :: Interfaces’:
* use this SVD file you just imported from the repository
* On GDB Server tab, select ST-Link from STMicroelectronics for the interface.My system would not load the program before starting a debug session, but other users report it EmBitz does work with their ST32F411RE devices. I had to go to disable automatic program loading (in ‘Debug :: Interfaces :: GDB Server :: Settings’, de-select ‘Load Program’ check-box), and before every debug session, load the program manually using either STLink utility (from STM; a huge beast) or qstlink2 tool (open source, 3MB single file).
Now I have full debugging capability. I hope this helps someone…
Dejan DeleticParticipantThanks,
I’ll investigate both options.
Dejan
-
AuthorPosts