CW 3.0 and flash/RAM_placement issue creating "No driver installed for memory range" error message
Running CrossStudio 3.0 for ARM on a STM32F407VG (1MB Flash, 192K RAM).
Although everything runs fine on CW 2.3, I'm not able to successfully download/program in 3.0. It stops during the erase procedure, right after erasing Flash and initializing my "framebuffer". The addresses don't appear correct for some reason.
My flash_placement.xml has this added under RAM:
<ProgramSection alignment="4" load="Yes" name=".framebuffer" start="0x20004000" size="0x012C00"/>
Here's the working output from CW 2.3 (I've included only the relevant portion):
Loading target script file STM32_Target.js
Executing script MatchPartName("STM32F407VG")
Preparing target for download
Loading target script file STM32_Target.js
Executing script FLASHReset()
Downloading “STM32F2xx_Loader_rpc.elf” to ST-LINK/V2
Programming
Programming 1.6 KB of .load_section addresses 20000000 — 2000068f
Programming completed in 139 ms — 12,086 bytes/sec
Verifying “STM32F2xx_Loader_rpc.elf” on ST-LINK/V2
Verifying
Verifying 1.6 KB of .load_section addresses 20000000 — 2000068f
Verifying completed in 84 ms — 20,000 bytes/sec
Erasing “Press_Counter.elf” on ST-LINK/V2
Erasing
Erasing 221.5 KB of addresses 08000000 — 08037637
Erasing 0.2 KB of addresses 08037638 — 08037763
Erasing 0.0 KB of .user_prefs addresses 08060000 — 08060013
Erasing 75.0 KB of .framebuffer addresses 20004000 — 20016bff
Erasing completed in 9.0 s — 33,920 bytes/sec
Here's the failing output from 3.0:
Loading target script file STM32_Target.js
Executing script MatchPartName("STM32F407VG")
Preparing target for download
Loading target script file STM32_Target.js
Executing script FLASHReset()
Downloading ‘STM32F2xx_Loader_rpc.elf’ to ST-LINK/V2
Programming
Programming 1.6 KB of .load_section addresses 20000000 — 2000068f
Programming completed in 480 ms — 3,500 bytes/sec
Download successful
Verifying ‘STM32F2xx_Loader_rpc.elf’ on ST-LINK/V2
Verifying
Verifying 1.6 KB of .load_section addresses 20000000 — 2000068f
Verifying completed in 400 ms — 4,200 bytes/sec
Verify successful
Erasing ‘Press_Counter.elf’ on ST-LINK/V2
Erasing
Erasing 218.2 KB of addresses 08000000 — 080368ef
Erasing 0.3 KB of addresses 080368f0 — 08036a2f
Erasing 0.0 KB of .user_prefs addresses 08060000 — 08060013
Erasing 84.9 KB of addresses 20001858 — 20016bff
Erase failed
The last "erasing" addresses is what I believe is in error, as it is not labeled ".framebuffer" and does not start at 20004000 where expected.
So, I don't know why it's initializing starting at 20001858, instead of 20004000.
I know this is the portion that is failing, as I deleted that section in the flash_placement.xml file and commented out all relevant code and I was able to download/program the MCU.
I get the feeling it's somehow not correctly identifying the Flash/RAM sizes from the chip package, but all indications show that it is, with the exception of the STM32F2xx Loader.
As an aside, anyone know why the SWD data rate is much slower? The SWO speed is set at 2 MHz, the maximum.
regards,
MAJ
-
Okay, Michael Johnson of CrossWorks Support showed me where I went wrong: :-)
In the flash_placement.xml file, I should have load="No" instead of "Yes" in the RAM placement portion:
<ProgramSection alignment="4" load="No" name=".framebuffer" start="0x20004000" size="0x012C00"/>
That way I can allocate to a specific address in v3 using the following:
static uint8_t framebuffer[320][240] __attribute__ ((section(".framebuffer")));
Hope this helps someone.
Please sign in to leave a comment.
Comments
1 comment