After a forced five-day break for family-related stuff I’m back at it,

The Nordic web-site really is poorly organised.  It’s very hard to know where to begin, or how to solve problems.

Today I tried to get the s130 demo app running.  This demo app could be very helpful to us because it allows you to simultaneously be a controller, and a peripheral, which is fundamental for our app.

However, most demos are compiled for Keil uVision-5 but this demo has been generated under uVision-4.  Of course it doesn’t compile, and I had to install uVision-4 so I could figure out what needed to be changed to make it work.  It took all day to downgrade to ‘4’, and I ended up doing a re-install of the whole laptop because the registry got damaged.

Anyway, I manged eventually to install ‘4’, compile it and, <fanfare of trumpets> I managed to get it to output the appropriate diagnostics on the serial port.  At least it is saying that the things that I know can’t work, “are not working”, so that’s kind of progress.

Sadly the program cannot be downloaded in the usual way directly from the IDE.  You have to use a different manual flashing tool, which is awkward.  Worse you can’t debug it with breakpoints and all that stuff.  It’s another bloody mess.

I need to get a bunch more parts of the demo working before I can start to understand if it really works, but at least it was a baby step in the right direction.

On 2 Oct 2014 22:47, “David Carkeek” <dcarkeek@gmail.com> wrote:

“…and I ended up doing a re-install of the whole laptop because the registry got damaged.”

Say it isn’t so. Is it what it sounds like? Did you at least have an image to start from?

By the way, is the T410 working out OK? I hope I didn’t steer you down the wrong path. If you have second thoughts You can get an i7 T420 for about $300.

From the Nordic website: “The S130 is Nordic’s most advanced feature-rich SoftDevice for Bluetooth® Smart (previously called Bluetooth low energy) to date.” If it’s the most advanced why wouldn’t it use uVision-5? 
I didn’t know that Keil is owned by ARM.
It sucks that you’re having to go through this. My fear is that it will happen all over again when we make new hardware.
Oh yes I had an image to roll back to.  Not as bad as I implied.  Sorry.
The T410 is fine so far.  It was a good steer.  Not done enough to stress it really.  The SSD makes so much difference, the rest is in the noise.
I will drag s310 over to uVision5 when I have exhumed the config details from the uV4 project.  It’s not like they are easy to guess.
When I move to new hardware I will have to figure out a new hardware profile, but I expect one of the devkit profiles will be close.
I guess my frustration is how hard it is to find a self-consistent set of examples.  Even now,  the s130 demo doesn’t talk to it’s peer demo device, the heart-rate monitor demo.  The HRM demo talks to my phone just fine, but clearly the two are inconsistent in some unspecified way.  
I have to keep telling myself that each one of these hurdles surmounted, is between us and the folks who may be chasing us.
//Mik (mobile)

————-
I sent a query about the flashing to Nordic:

In the README file packed with s130 demo example your say:
“This SoftDevice release has internal changes that requires that the SoftDeviceis programmed onto the chip in a specific way. The following Nordic tools handle this:
– nrfjprog version 5.0.1 or higher- nRFgo Studio version 1.17.0 or higher.
If you have these updated tools, programming can be done as usual. If these tools are not available, a separate programming tool will be distributed with the release.”
Is this still the case or are there some magic parameters that I can set in uVision-4 that make it possible to flash directly out of the IDE?
Currently I’m getting the garbage in attached file.

Load “C:\Nordic Semiconductor\nRF51 SDK_v6.1.0.0\Nordic\nrf51822\hex\Example\s130_demo_app\build\S130_demo.axf”

Set JLink Project File to “C:Nordic SemiconductornRF51 SDK_v6.1.0.0Nordicnrf51822hexExamples130_demo_appJLinkSettings.ini”
* JLink Info: Device “NRF51822_XXAA” selected (257 KB flash, 16 KB RAM).

JLink info:
————
DLL: V4.92 , compiled Sep 30 2014 09:33:42
Firmware: J-Link OB-SAM3U128 V1 compiled Aug 22 2014 17:25:44
Hardware: V1.00
S/N : 480209391

* JLink Info: Found SWD-DP with ID 0x0BB11477
* JLink Info: Found Cortex-M0 r0p0, Little endian.
* JLink Info: FPUnit: 4 code (BP) slots and 0 literal slots
ROMTableAddr = 0xE00FF003

Target info:
————
Device: nRF51822_xxAA
VTarget = 3.300V
State of Pins:

TCK: 0, TDI: 0, TDO: 1, TMS: 1, TRES: 1, TRST: 1
Hardware-Breakpoints: 4
Software-Breakpoints: 8192
Watchpoints: 2
JTAG speed: 2000 kHz

Include “C:\Nordic Semiconductor\nRF51 SDK_v6.1.0.0\Nordic\nrf51822\hex\Example\s130_demo_app\s130_demo_loader.ini”

LOAD %L INCREMENTAL
SET SRC=.\src
RESET
Insufficient RAM for Flash Algorithms !
Erase Failed!
Error: Flash Download failed – “Cortex-M0”

Hi Michael, 
The newer J-link drivers requires more ram for the flash algorithm which is unfortunately not increased automatically, hence the error in your log file.  Please see attached screen shot of the correct flash configuration. This should let you flash directly from the IDE.
Best regards,
Vidar Berg

Leave a Reply