Nordic nRF51 Examples and CrossWorks
There are a bunch of us over on the Nordic nRF51 site trying to get CrossWorks to work with nRF51 samples. The sample from Nordic are Keil projects. Luckily CrossWorks support import of those types of projects. But it is loading the binary are address "0x00000". How can I tell CrossWorks the load the binary at "0x18000" instead. I suspect that the file "Loader_MemoryMap.xml" maybe the correct file to change but it did not seem to work for me.
Here is a detailed explanation of what I have tried so far: https://devzone.nordicsemi.com/question/31440/nrf51_sdk_800-ble_stack_init-hangs/ and some really good responses.
Thank you,
-
I am getting the soft device loaded no problem. And I can load the app binary. But when I load the app binary it blows away the soft device because it is loaded at 0x0000 in stead of 0x1800. What I was wonder is what is the best way to compile app to load at 0x1800 instead of 0x000 and not erase entire chip. I found a macro that seems to do this but I can't find it in the CrossWorks documentation.
-
Turns out this is the trick. I had to add the following two macros:
FLASH_START=0x18000
RAM_START=0x20002000
to get the binary to start at 0x18000
-
@Michael,
Sorry, I am still not getting what you are saying. I googled and put "Flash_S120" in CrossWorks Help but I get no results.
I removed "FLASH_START=0x18000" & "RAM_START=0x20002000" from "Section Placement Macro" and selected "Flash_S110" from "Section Placement". When I do this the resulting ELF file is created with address 0x16000 instead of 0x18000.
Also I see this in the output when I try and run the binary which indicates an offset of "0x16000" instead of "0x18000". The value 0x16000 is the value from Nordic SDK 7.x but I am using Nordic SDK 8.0.
Preparing target for download
Loading target script file nRF51_Target.js
Executing script FLASHReset()
Programming
Programming 0.1 KB of .vectors addresses 00016000 — 000160bf
Programming 0.4 KB of .init addresses 000160c0 — 00016273
Programming 13.8 KB of .text addresses 00016274 — 000199cf
Programming 0.6 KB of .rodata addresses 000199d0 — 00019c63
Programming 0.0 KB of .data addresses 00019c64 — 00019c7b
Compare
Compare completed in 138 ms
Erase
Erase completed in 74 ms
Program
Programming failed @ address 0x00000000 (block verification error)
Program completed in 108 ms
JLINKARM_EndDownload Error during program/erase phase
Program completed in 529 ms
Verifying ‘nrf51422_xxac_s110.elf’ on SEGGER J-Link
Verifying
Verifying 0.1 KB of .vectors addresses 00016000 — 000160bf
Verifying completed in 143 ms — 108,279 bytes/sec
Verifying completed in 266 ms — 3 bytes/secI am using:
CrossWorks for ARM
Release 3.3.1.2014121602.22877
Mac OS x86If I put it back to "Section Placement=Flash" and define "Section Placement Macro" with the to macros above it works. Can you help me understand what I am doing wrong?
My project file is attached with the configuration "Flash_S110" set.
The file "wrong_nrf51422...elf" is built with "Flash_S110" set and crashes at launch
The file "good_nrf51422...elf" is built with Section Placement Macro set to FLASH_START, RAM_START.
Do I need to redefine "Flash_S120" somewhere?
Thank you for your help.
-
If you look at the properties displayed in the project explorer there's a property called "Property Groups File", you can right click on this and select "Open" to see the file in the text editor.
Alternatively you can navigate to the packages directory using File | Open Studio Folder | Packages Folder.
Please sign in to leave a comment.
Comments
12 comments