In order to run a .hex file you don’t need to install Eclipse or any of that crap. You just need to install the “flasher”, erase the memory, and then flash the test program.
Flashing test program #1
- Go to the TESTING directory
- If you don’t have it installed already, download and install JFlashLite_V485a.zip
- Download the test program Blinky32k_C_nRF51822.hex
- The UI to JFlashLite is tedious but easy.
- Make sure to specify the correct processor using the pull-down menu. nRF51822_xxAA
- Erase the memory first time around.
- Set the “Data file” field to point at the test program .hex file
- Press “Program Device”
- After the flashing process, the program might not start automatically (probably because there is a fossil breakpoint at “main”). If it doesn’t start, then power-cycle the board.
while (true)
{
LED_clearAll();
nrf_delay_ms(500);
LED_setAll();
nrf_delay_ms(500);
LED_clearAll();
for (int i = 0; i < LEDS_NUMBER; i++)
{
LEDS_INVERT(1 << leds[i]);
nrf_delay_ms(500);
}
}
Test program #2
- Plug the USB port into the PC – a new COM port should be created
- Open your favorite terminal-emulator (e.g. Putty?)
- Set 38400, 8, 1, parity:none, flow-control:none
- Download and flash the test program Blinky32K_USB_C_nRF51822.hex
while (true)
{
LED_clearAll();
nrf_delay_ms(500);
LED_setAll();
nrf_delay_ms(500);
LED_clearAll();
for (int i = 0; i < LEDS_NUMBER; i++)
{
LEDS_INVERT(1 << leds[i]);
nrf_delay_ms(500);
}
ts_uart_init();
TS_TRACE(“rn———–rn%s HW:%s SM:%s SW:%s(%s %s)rn”,
MANUFACTURER_NAME, DEVICE_NAME, SDNAME, SERVICE_NAME, __DATE__,
__TIME__);
}