This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Program SoftDevice in Linux

I have been following this post and pure-gcc to set up my eclipse environment in ubuntu 14.04. Thus far everything works well except i cant figure out why the softdevice is corrupt when i use linux. I am using the evaluation board.

Using the command:

make flash-softdevice s110_nrf51822_6.0.0_softdevice.hex

in linux. It give me this output:

JLinkExe -device nrf51822 -if swd -speed 1000  erase-all.jlink
SEGGER J-Link Commander V4.86a ('?' for help)
Compiled Jun 11 2014 17:45:43

Script file read successfully.
Info: Device "NRF51822_XXAA" selected (257 KB flash, 16 KB RAM).
DLL version V4.86a, compiled Jun 11 2014 17:45:40
Firmware: J-Link OB-SAM3U128 V1 compiled Dec 11 2013 20:20:11
Hardware: V1.00
S/N: 480203173 
VTarget = 3.300V
Info: Found SWD-DP with ID 0x0BB11477
Info: Found Cortex-M0 r0p0, Little endian.
Info: FPUnit: 4 code (BP) slots and 0 literal slots
Found 1 JTAG device, Total IRLen = 4:
Cortex-M0 identified.
Target interface speed: 1000 kHz
Processing script file...

Writing 00000002 -> 4001E504

Writing 00000001 -> 4001E50C

Sleep(100)

Reset delay: 0 ms
Reset type NORMAL: Resets core & peripherals via SYSRESETREQ & VECTRESET bit.


Script processing completed.

make: [erase-all] Error 1 (ignored)
# Convert from hex to binary. Split original hex in two to avoid huge (>250 MB) binary file with just 0s.
arm-none-eabi-objcopy -Iihex -Obinary --remove-section .sec3 /home/leps/Nordic/s110_nrf51822_6.0.0/s110_nrf51822_6.0.0_softdevice.hex _build/s110_nrf51822_6.0.0_softdevice_mainpart.bin
arm-none-eabi-objcopy -Iihex -Obinary --remove-section .sec1 --remove-section .sec2 /home/leps/Nordic/s110_nrf51822_6.0.0/s110_nrf51822_6.0.0_softdevice.hex _build/s110_nrf51822_6.0.0_softdevice_uicr.bin
JLinkExe -device nrf51822 -if swd -speed 1000  flash-softdevice.jlink
SEGGER J-Link Commander V4.86a ('?' for help)
Compiled Jun 11 2014 17:45:43

Script file read successfully.
Info: Device "NRF51822_XXAA" selected (257 KB flash, 16 KB RAM).
DLL version V4.86a, compiled Jun 11 2014 17:45:40
Firmware: J-Link OB-SAM3U128 V1 compiled Dec 11 2013 20:20:11
Hardware: V1.00
S/N: 480203173 
VTarget = 3.300V
Info: Found SWD-DP with ID 0x0BB11477
Info: Found Cortex-M0 r0p0, Little endian.
Info: FPUnit: 4 code (BP) slots and 0 literal slots
Found 1 JTAG device, Total IRLen = 4:
Cortex-M0 identified.
Target interface speed: 1000 kHz
Processing script file...

Writing 00000001 -> 4001E504

Downloading file... [_build/s110_nrf51822_6.0.0_softdevice_mainpart.bin]
Info: J-Link: Flash download: Flash programming performed for 1 range (77824 bytes)
Info: J-Link: Flash download: Total time needed: 1.312s (Prepare: 0.088s, Compare: 0.016s, Erase: 0.000s, Program: 1.195s, Verify: 0.005s, Restore: 0.006s)

Downloading file... [_build/s110_nrf51822_6.0.0_softdevice_uicr.bin]
Info: J-Link: Flash download: Flash programming performed for 1 range (1024 bytes)
Info: J-Link: Flash download: Total time needed: 0.150s (Prepare: 0.106s, Compare: 0.001s, Erase: 0.000s, Program: 0.006s, Verify: 0.000s, Restore: 0.035s)

Reset delay: 0 ms
Reset type NORMAL: Resets core & peripherals via SYSRESETREQ & VECTRESET bit.



Script processing completed.

make: [flash-softdevice] Error 1 (ignored)

which appears to program the softdevice. Then I flash the application (in this case the ble_app_uart) and get the following:

JLinkExe -device nrf51822 -if swd -speed 1000  flash.jlink
SEGGER J-Link Commander V4.86a ('?' for help)
Compiled Jun 11 2014 17:45:43

Script file read successfully.
Info: Device "NRF51822_XXAA" selected (257 KB flash, 16 KB RAM).
DLL version V4.86a, compiled Jun 11 2014 17:45:40
Firmware: J-Link OB-SAM3U128 V1 compiled Dec 11 2013 20:20:11
Hardware: V1.00
S/N: 480203173 
VTarget = 3.300V
Info: Found SWD-DP with ID 0x0BB11477
Info: Found Cortex-M0 r0p0, Little endian.
Info: FPUnit: 4 code (BP) slots and 0 literal slots
Found 1 JTAG device, Total IRLen = 4:
Cortex-M0 identified.
Target interface speed: 1000 kHz
Processing script file...

Reset delay: 0 ms
Reset type NORMAL: Resets core & peripherals via SYSRESETREQ & VECTRESET bit.

Downloading file... [_build/kinomote_s110.bin]
Info: J-Link: Flash download: Flash programming performed for 1 range (9216 bytes)
Info: J-Link: Flash download: Total time needed: 0.258s (Prepare: 0.082s, Compare: 0.002s, Erase: 0.000s, Program: 0.166s, Verify: 0.000s, Restore: 0.006s)

Reset delay: 0 ms
Reset type NORMAL: Resets core & peripherals via SYSRESETREQ & VECTRESET bit.



Script processing completed.

make: [flash] Error 1 (ignored)

however the evaluation board is not detected on my Android device.

If I instead use nRFgo Studio on windows to program the softdevice and use linux to load the application it works fine!

Much Thanks in advanced,

Nick

Related