xineye
February 20, 2019, 3:28pm
#1
I build and upload my mbed program using PlatformIO with VSCode.
I seemed no errors as follows.
But It looks BLE Nano doesn’t run new program.
What the matter ?
PlatformIO core: 3.6.4
Nordic nRF51 liberary: 4.0.0
Verbose mode can be enabled via -v, --verbose
option
PLATFORM: Nordic nRF51 > RedBearLab BLE Nano 1.5
HARDWARE: NRF51822 16MHz 32KB RAM (256KB Flash)
DEBUG: CURRENT(cmsis-dap) ON-BOARD(cmsis-dap) EXTERNAL(blackmagic, jlink, stlink)
LDF MODES: FINDER(chain) COMPATIBILITY(soft)
Collected 4 compatible libraries
Scanning dependencies…
No dependencies
Compiling .pioenvs\redBearLabBLENano\src\main.o
Linking .pioenvs\redBearLabBLENano\firmware.elf
Checking size .pioenvs\redBearLabBLENano\firmware.elf
Building .pioenvs\redBearLabBLENano\userfirmware.hex
DATA: [ ] 2.9% (used 960 bytes from 32768 bytes)
PROGRAM: [ ] 4.7% (used 12240 bytes from 262144 bytes)
merge_firmwares([".pioenvs\redBearLabBLENano\firmware.hex"], [".pioenvs\redBearLabBLENano\userfirmware.hex"])
Configuring upload protocol…
AVAILABLE: blackmagic, cmsis-dap, jlink, mbed, nrfjprog, stlink
CURRENT: upload_protocol = mbed
Looking for upload disk…
Auto-detected: E:
Uploading .pioenvs\redBearLabBLENano\firmware.hex
Firmware has been successfully uploaded.
(Some boards may require manual hard reset)
xineye:
Auto-detected: E:
Have you verified that this is the correct drive?
If it hangs up during runtime we’d need to know what program you’re running. Does a simple blink sketch? A “hello world” via serial?
xineye
February 21, 2019, 11:17am
#3
Thank u for your replying.
Yes, I tryied to build and upload the example “mbed-blink” (https://github.com/platformio/platform-nordicnrf51/tree/master/examples/mbed-blink )
But the result is same.
I found that there isn’t exist file “.pioenvs\redBearLabBLENano\firmware.hex”.
This is right stauts?
xineye:
But the result is same.
Meaning what result? No LED blinking? Can you check the PlatformIO core version used? (pio --version
or the version string in the VSCode GUI)
xineye
February 21, 2019, 11:55am
#5
Meaning what result? No LED blinking? Can you check the PlatformIO core version used? ( pio --version
or the version string in the VSCode GUI)
Yes, No LED blinking.
Can you check the PlatformIO core version used? ( pio --version
or the version string in the VSCode GUI)
I use this PlatformIO core.
PlatformIO core: 3.6.4
Are you sure you have the right board? Is it a RedBearLab BLE Nano 1.5 (nRF51 chip) or RedBearLab BLE Nano 2 (nRF52 chip)?
xineye
February 21, 2019, 12:04pm
#7
Yes, I use BLE Nano 1.5.
I checked the board print.
Can you check if it works with the Arduino IDE? (- YouTube )
Actually the problem does seem to be as you noticed
This was reported here: nrf51822 : support for mbed framework broken · Issue #26 · platformio/platform-nordicnrf51 · GitHub
Can you try to go to your platformio.ini
and roll-back the used framework version? Put
platform = nordicnrf51@4.0.0
(or @3.5.0
if this doesn’t work) for the environment you’re using.
xineye
February 21, 2019, 12:32pm
#10
I already use nordicnrf51@4.0.0.
So I tried with nordicnrf51@3.5.0.
Then uploading succeeded !
Thank you!
xineye
February 21, 2019, 1:24pm
#11
Then uploading succeeded.
… But LED stil not blinking
What code are you using? If you follow the LED1 definition what pin does it refer to? Is that the correct one for your board?
xineye
February 22, 2019, 4:40pm
#13
What code are you using? If you follow the LED1 definition what pin does it refer to? Is that the correct one for your board?
I use the following “mbed-blink” (https://github.com/platformio/platform-nordicnrf51/tree/master/examples/mbed-blink )
And use pin “LED1”.
I confirm the code is right by building with mbed.