As far as I know, the original libmaple EEPROM library used a reserved(?) space of the flash memory to emulate the arduino EEPROM lib.
So my idea is to “highjack” this hidden memory for a new library. The drawback is, that for every MCU type there must be a specific #ifdef (64/128k 128/256k 256/512) and a little testing code for each individual device: Writing and reading back some pattern, dividing the FLASH into sectors and write a good/bad table of the proofed sectors. (Maybe not necessary at all, so if additional flash is available it should work anyway)
BTW: Has someone tried to access to the additional memory of the maple mini clones (STM32F103CBT6) or is 128k the physical limit for that MCU (because stm32f103c8t6 is the “cut down” version)? So the lib would only be useful for the masses if widespread devices can do the trick.
If you want to test the limit, you can easily write a script that goes writing and reading addresses over that limit, and reading back the values to confirm it was written successfully.
My suspicion is that the CB chip is the limit for that silicon, but who knows, perhaps there is extra Flash or Ram hidden…
In the RCT board I never tried to go over 512KB or 64KB of RAM, but who knows, it is possible that there is even more…
I think the C series are called Medium Density, (the F103RB) may also be Medium Density.
The F103RC and RE and V series and Z series, are High Density devices.
I suspect that there are two completely different silicon fab chips inside the package.
So although the C8 could be a CB, its less likely that a C8 or a CB contains a High density device inside.
We don’t currently have variants for the F or G versions e.f. F103RGT , but it would be easy to add them, so that F103RCT board owners could try the board as an F103RGT
If I have time later I’ll test on a maple mini later and let you know.
Also if I try to read RAM past 2000FFFF (the 64KB top), the sketch just crashes.
I’ll post maple mini results when I get a chance to test.
Roger, I don’t think we should mislead anyone by setting the core to use higher limits, but it is good to know if they exist.
I.E. I was using the RET linker script with RCT board and works fine, I do know that I am using an option that does not correspond to the MCU in my board, so the decision depends on me to consciously select an MCU different than the one I should.
I think Madias is not suggesting that the core goes over the limit in the C8 boards, but that if extra flash is available, we can make a conscious choice to use it by compiling for the CB, or even an RC if that much extra is available.
Also if I try to read RAM past 2000FFFF (the 64KB top), the sketch just crashes.
Also if I try to read RAM past 2000FFFF (the 64KB top), the sketch just crashes.
I suspect the temptation to experiment with writing in that area is now irresistible… however it might be difficult to figure out what, if any effect they have…
…there is a chance of course that this may be where things like the unique identifier and the cpu ID live.
You could get out the magnifying glass and take a look at the die shot ![]()
You might want to set:
(gdb) set mem inaccessible-by-default off
This allows you to access addresses outside the official chip memory map.
I was thinking, that even though we don’t have the Eclipse standalone debugger yet (unless you are on Linux, like andy and Rick), then perhaps we should add a debug menu to at least the Generic STM32F103C boards, that kicks off GDB in a shell window.
There are some nice videos on Youtube by Harvard Uni, that explain how to use GDB on the command line, and I think there would definately be a few people who’d like to give GDB a try if they didnt have to manually run st-util etc
BTW. Thinking about Rick’s posting about OpenOCD. (I will try to reply to that thread when I get chance), that perhaps we’d be better off using OpenOCD than Texane for STLink. However I’ve not looked to see if OpenOCD supports upload (and erase etc) via STlink.
Anyway, just a thought.
PS. Sorry I’ve not had chance to do much on the repo this weekend, but domestic events (the fence between me and the neighbors) needed my attention for the last 2 days ;-(
I suspect the temptation to experiment with writing in that area is now irresistible… however it might be difficult to figure out what, if any effect they have…
…there is a chance of course that this may be where things like the unique identifier and the cpu ID live.
You could get out the magnifying glass and take a look at the die shot ![]()
I was thinking, that even though we don’t have the Eclipse standalone debugger yet (unless you are on Linux, like andy and Rick), then perhaps we should add a debug menu to at least the Generic STM32F103C boards, that kicks off GDB in a shell window.
http://www.st.com/web/en/resource/techn … 165693.pdf
-rick
I was thinking, that even though we don’t have the Eclipse standalone debugger yet (unless you are on Linux, like andy and Rick), then perhaps we should add a debug menu to at least the Generic STM32F103C boards, that kicks off GDB in a shell window.
I have something like this:
# blackmagic probe w/gdb upload
tools.bmp_gdb_upload.cmd=arm-none-eabi-gdb
tools.bmp_gdb_upload.path={runtime.tools.arm-none-eabi-gcc.path}/bin/
tools.bmp_gdb_upload.upload.speed=115200
tools.bmp_gdb_upload.upload.params.verbose=
tools.bmp_gdb_upload.upload.params.quiet=-q --batch-silent
tools.bmp_gdb_upload.upload.pattern=xterm -e "{path}{cmd}" -q -cd "{build.path}" -b {upload.speed} {upload.verbose} -ex "set debug remote 0" -ex "set target-async off" -ex "set remotetimeout 60" -ex "set mem inaccessible-by-default off" -ex "set confirm off" -ex "set height 0" -ex "target extended-remote {serial.port}" -ex "monitor swdp_scan" -ex "attach 1" -ex "x/wx 0x8000004" -ex "monitor erase_mass" -ex "echo 0x8000004 expect 0xffffffff after erase\n" -ex "x/wx 0x8000004" -ex "file {build.project_name}.elf" -ex "load" -ex "x/wx 0x08000004" -ex "directory {source_file}" -ex "tbreak setup"
$COLORTERM -e “st-util” -t “st-link Debugger”
PS. Sorry I’ve not had chance to do much on the repo this weekend, but domestic events (the fence between me and the neighbors) needed my attention for the last 2 days ;-(
Yes. Everyone is happy now we have a 2m high fence ![]()

