New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compiled code doesnt seem to run on redbearlabblenano #500

Closed
mogorman opened this Issue Feb 7, 2016 · 17 comments

Comments

Projects
None yet
3 participants
@mogorman

mogorman commented Feb 7, 2016

i have a version 1.0 redbearlab ble nano. I created simple blink script and had it upload it. It just bricks my device. I can reflash it with arduino boot loader or sample mbed blinky lights demo and it works fine. I can also program it via arduino ide and have no problems with it. Anything I can do to try to debug let me know.

@ivankravets ivankravets added this to the 2.8.4 milestone Feb 8, 2016

@mogorman

This comment has been minimized.

mogorman commented Feb 8, 2016

i tried taking the ld linker script from the arduino code and used it in build flags so that i could try uploading the code using their bootloader. this also failed. I don't think platformio is generating a proper intel hex to be uploaded.

@mogorman

This comment has been minimized.

mogorman commented Feb 8, 2016

ive also tried this on my mac and gnu/linux machine, as well as enabling sync flag on mounting of the drive just in case.

@valeros

This comment has been minimized.

Member

valeros commented Feb 8, 2016

Hi @mogorman! Thanks for your report! Could I ask you to test some firmwares with your board? Your board should just blink:

#include "mbed.h"
DigitalOut myled(P0_19);

int main(void)
{
    while (1)
    {
        myled = !myled;
        wait(1);
    } 
}
@mogorman

This comment has been minimized.

mogorman commented Feb 8, 2016

yes i can.

@mogorman

This comment has been minimized.

mogorman commented Feb 8, 2016

i tried copying all of them to the board. none of them blinked the led on pin P0_19. I didn't know what to look for aside from that to tell if it worked? they did all take much longer to upload, like the intel hex was legit though. What should I be looking for once the code is running?

@valeros

This comment has been minimized.

Member

valeros commented Feb 9, 2016

Please try this version. Does it work?

@mogorman

This comment has been minimized.

mogorman commented Feb 9, 2016

it looks like this one attempts to flash but fails, when i reboot the board, it still is running the arduino bootloader from redbear labs

@valeros

This comment has been minimized.

Member

valeros commented Feb 9, 2016

Let's put aside all about Arduino. Do you have removable mass storage disk named MBED in your system? Firmware from mbed cloud compiler works fine?

@mogorman

This comment has been minimized.

mogorman commented Feb 9, 2016

im not using arduino to flash. aside from one time i tried that way. sorry for confusion. I have been copying to the MBED storage device on my pc. I haven't tried the cloud compiler. let me set up account and try that now.

@mogorman

This comment has been minimized.

mogorman commented Feb 9, 2016

can confirm that mbed web compiler works with the following code

#include "mbed.h"

DigitalOut myled(LED1);

int main()
{
    while(1) {
        myled = 1;
        wait(1);
        myled = 0;
        wait(1);
    }
}
@valeros

This comment has been minimized.

Member

valeros commented Feb 9, 2016

Thanks. Could you test please this hex? It's compiled from exported project for GCC toolchain.

@mogorman

This comment has been minimized.

mogorman commented Feb 9, 2016

did not seem to run. i tested by flashing code that does not use led. then flashing this code. then after seeing this code did not work i flashed with my blink code i made in web compiler and confirmed it ran.

@mogorman

This comment has been minimized.

mogorman commented Feb 9, 2016

using there local builder it is producing a 14k hexfile compared to the 300k hexfile the web produced with same code

@valeros

This comment has been minimized.

Member

valeros commented Feb 9, 2016

Yep, looks like it's not PlatformIO problem. I will look for a workaround and let you know if there is any information. Thanks!

@mogorman

This comment has been minimized.

mogorman commented Feb 9, 2016

actually i take that back. it does work. i didnt have srecord installed in environment. it needed to combine the two hexs together

@mogorman

This comment has been minimized.

mogorman commented Feb 9, 2016

I just tested the output of platformio generated code when combined with the hex like they do and it worked

srec_cat mbed/TARGET_RBLAB_BLENANO/TARGET_NORDIC/TARGET_MCU_NRF51822/Lib/s130_nrf51822_1_0_0/s130_nrf51_1.0.0_softdevice.hex -intel .pioenvs/redbear/firmware.hex -intel -o test.hex -intel --line-length=44
@mogorman

This comment has been minimized.

mogorman commented Feb 9, 2016

actually i just confirmed its same softdevice shipped with platformio

valeros added a commit that referenced this issue Aug 2, 2016

ivankravets added a commit that referenced this issue Aug 2, 2016

ivankravets added a commit that referenced this issue Aug 2, 2016

Merge branch 'develop' into feature/platformio-30
* develop: (21 commits)
  Use stable docs
  Version bump to 2.11.2 (issues #500, #533, #732, #731, #737, #733, #438, #722, #52, #725)
  Update project configuration template
  Use stable docs
  Implement firmware merging with base firmware for Nordic nRF51 development platform // Resolve #500 , Resolve #533
  Fix firmware uploading to Atmel SAMD21-XPRO board using ARM mbed framework // Resolve #732
  Add firmware merging process for nordicnrf51 // Issue #533, #500
  Add OpenOCD as an alternative upload method for atmelsam platform // Issue #732
  Sync flags parser with PlatformIO 3.0 branch // Resolve #738
  Update ``udev`` rules for the new STM32F407DISCOVERY boards // Resolve #731
  Add explanation about "Failed to find MSBuild toolsets directory"
  Add support for local "--echo" for Serial Port Monitor // Resolve #733
  Update history
  Improve support for Microchip PIC32 development platform and ChipKIT boards // Resolve #438
  Fix Project Generator for ESP8266 and ARM mbed based projects
  Switch to gcc-built LwIP library for espressif platform
  Push 2.11.2.dev2
  Fix linking process for microchippic32 platfrom // Issue #438
  Improve Project Generator for PlatformIO IDE (fixes incorrect linter errors)

@ivankravets ivankravets referenced this issue Aug 3, 2016

Closed

platformio 2.11.2 #3577

4 of 4 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment