Skip to content
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

Building classic projects for microbit #327

Open
arekzaluski opened this issue Aug 17, 2016 · 15 comments
Open

Building classic projects for microbit #327

arekzaluski opened this issue Aug 17, 2016 · 15 comments

Comments

@arekzaluski
Copy link
Collaborator

Building classic projects for Microbit doesn't seem to work.
I've tried to build https://developer.mbed.org/teams/BBC/code/microbit_blinky/?platform=Microbit and https://developer.mbed.org/teams/microbit/code/microbit-hello-world/ projects. Both of them are failing to build correctly.

The command I'm using is
mbed compile -t GCC_ARM -m NRF51_MICROBIT

@screamerbg @bogdanm

@theotherjimmy
Copy link
Contributor

theotherjimmy commented Aug 25, 2016

Could you post the output that is associated with the failure after appending -v to the command line? It would help me root cause the problem you are having.

[Mirrored to Jira]

@arekzaluski
Copy link
Collaborator Author

arekzaluski commented Aug 25, 2016

@theotherjimmy
Sure here is the output of
mbed compile -t GCC_ARM -m NRF51_MICROBIT -v

microbit_output.txt

[Mirrored to Jira]

@janjongboom
Copy link
Contributor

janjongboom commented Sep 5, 2016

Potential micro:bit partner also ran into this... I cannot compile with ARMCC either.

Errors like this:

[Error] device_manager.h@509,37: 'p_ble_evt' was not declared in this scope
[ERROR] In file included from ./microbit/microbit-dal/nRF51822/nrf51-sdk/source/nordic_sdk/components/libraries/bootloader_dfu/dfu_app_handler.h:57:0,
                 from ./microbit/microbit-dal/BLE_API/ble/services/DFUService.h:26,
                 from ./microbit/microbit-dal/BLE_API/source/services/DFUService.cpp:19:
./microbit/microbit-dal/nRF51822/nrf51-sdk/source/nordic_sdk/components/ble/ble_services/ble_dfu/ble_dfu.h:190:44: error: 'ble_evt_t' has not been declared
 void ble_dfu_on_ble_evt(ble_dfu_t * p_dfu, ble_evt_t * p_ble_evt);
                                            ^
In file included from ./microbit/microbit-dal/nRF51822/nrf51-sdk/source/nordic_sdk/components/libraries/bootloader_dfu/dfu_app_handler.h:60:0,
                 from ./microbit/microbit-dal/BLE_API/ble/services/DFUService.h:26,
                 from ./microbit/microbit-dal/BLE_API/source/services/DFUService.cpp:19:
./microbit/microbit-dal/nRF51822/nrf51-sdk/source/nordic_sdk/components/ble/device_manager/device_manager.h:509:25: error: variable or field 'dm_ble_evt_handler' declared void
 void dm_ble_evt_handler(ble_evt_t * p_ble_evt);
                         ^
./microbit/microbit-dal/nRF51822/nrf51-sdk/source/nordic_sdk/components/ble/device_manager/device_manager.h:509:25: error: 'ble_evt_t' was not declared in this scope
./microbit/microbit-dal/nRF51822/nrf51-sdk/source/nordic_sdk/components/ble/device_manager/device_manager.h:509:37: error: 'p_ble_evt' was not declared in this scope
 void dm_ble_evt_handler(ble_evt_t * p_ble_evt);

[Mirrored to Jira]

@bridadan
Copy link
Contributor

bridadan commented Sep 6, 2016

I looked into why blinky wasn't compiling, looks like the pinned release of the microbit didn't actually support GCC_ARM at the time, or at least it wasn't included in the release. It compiles ok for ARM.

If you update the mbed.bld file to the latest version (2e9cc70d1897), I can compile blinky for GCC_ARM.

I'm afraid I don't know much about the other example since it isn't using the official mbed release.

[Mirrored to Jira]

@arekzaluski
Copy link
Collaborator Author

arekzaluski commented Sep 16, 2016

@bridadan Thanks. I was able to build microbit-blinky after updating mbed.bld to the latest version.

[Mirrored to Jira]

@screamerbg
Copy link
Contributor

screamerbg commented Oct 18, 2016

@arekzaluski Did this fix the issue? If so, are you happy to close this?

[Mirrored to Jira]

@screamerbg
Copy link
Contributor

screamerbg commented Nov 25, 2016

Closing this as there is no activity. Please reopen if the issue persists.
[Mirrored to Jira]

@thegecko
Copy link
Member

thegecko commented Jul 17, 2018

Re-opening this issue as it is still apparent with the promoted micro:bit examples being run locally with gcc.

E.g. this example:

https://os.mbed.com/teams/BBC/code/microbit-component-display/

Fails in mbed-cli with the following:

Building project microbit-component-display (NRF51_MICROBIT, GCC_ARM)
Scan: .
Scan: env
Scan: mbed
Compile [  1.0%]: GapScanningParams.cpp
Compile [  2.0%]: BLE.cpp
Compile [  3.1%]: DiscoveredCharacteristic.cpp
Compile [  4.1%]: main.cpp
Compile [  5.1%]: ble_radio_notification.c
Compile [  6.1%]: DFUService.cpp
[Error] ble_dfu.h@190,44: 'ble_evt_t' has not been declared
[Error] device_manager.h@509,25: variable or field 'dm_ble_evt_handler' declared void
[Error] device_manager.h@509,0: 'ble_evt_t' was not declared in this scope
[Error] device_manager.h@509,37: 'p_ble_evt' was not declared in this scope
[Warning] ble_l2cap.h@133,45: 'uint32_t sd_ble_l2cap_cid_register(uint16_t)' defined but not used [-Wunused-function]
[ERROR] In file included from ./microbit/microbit-dal/nRF51822/nrf51-sdk/source/nordic_sdk/components/libraries/bootloader_dfu/dfu_app_handler.h:57:0,
                 from ./microbit/microbit-dal/BLE_API/ble/services/DFUService.h:26,
                 from ./microbit/microbit-dal/BLE_API/source/services/DFUService.cpp:19:
./microbit/microbit-dal/nRF51822/nrf51-sdk/source/nordic_sdk/components/ble/ble_services/ble_dfu/ble_dfu.h:190:44: error: 'ble_evt_t' has not been declared
 void ble_dfu_on_ble_evt(ble_dfu_t * p_dfu, ble_evt_t * p_ble_evt);
                                            ^~~~~~~~~
In file included from ./microbit/microbit-dal/nRF51822/nrf51-sdk/source/nordic_sdk/components/libraries/bootloader_dfu/dfu_app_handler.h:60:0,
                 from ./microbit/microbit-dal/BLE_API/ble/services/DFUService.h:26,
                 from ./microbit/microbit-dal/BLE_API/source/services/DFUService.cpp:19:
./microbit/microbit-dal/nRF51822/nrf51-sdk/source/nordic_sdk/components/ble/device_manager/device_manager.h:509:25: error: variable or field 'dm_ble_evt_handler' declared void
 void dm_ble_evt_handler(ble_evt_t * p_ble_evt);
                         ^~~~~~~~~
./microbit/microbit-dal/nRF51822/nrf51-sdk/source/nordic_sdk/components/ble/device_manager/device_manager.h:509:25: error: 'ble_evt_t' was not declared in this scope
./microbit/microbit-dal/nRF51822/nrf51-sdk/source/nordic_sdk/components/ble/device_manager/device_manager.h:509:37: error: 'p_ble_evt' was not declared in this scope
 void dm_ble_evt_handler(ble_evt_t * p_ble_evt);
                                     ^~~~~~~~~
In file included from ./microbit/microbit-dal/nRF51822/nrf51-sdk/source/nordic_sdk/components/softdevice/s130/headers/ble_l2cap.h:45:0,
                 from ./microbit/microbit-dal/nRF51822/nrf51-sdk/source/nordic_sdk/components/softdevice/s130/headers/ble_gatts.h:44,
                 from ./microbit/microbit-dal/nRF51822/nrf51-sdk/source/nordic_sdk/components/ble/ble_services/ble_dfu/ble_dfu.h:51,
                 from ./microbit/microbit-dal/nRF51822/nrf51-sdk/source/nordic_sdk/components/libraries/bootloader_dfu/dfu_app_handler.h:57,
                 from ./microbit/microbit-dal/BLE_API/ble/services/DFUService.h:26,
                 from ./microbit/microbit-dal/BLE_API/source/services/DFUService.cpp:19:
./microbit/microbit-dal/nRF51822/nrf51-sdk/source/nordic_sdk/components/softdevice/s130/headers/ble_l2cap.h:133:45: warning: 'uint32_t sd_ble_l2cap_cid_register(uint16_t)' defined but not used [-Wunused-function]
 SVCALL(SD_BLE_L2CAP_CID_REGISTER, uint32_t, sd_ble_l2cap_cid_register(uint16_t cid));
                                             ^
./microbit/microbit-dal/nRF51822/nrf51-sdk/source/nordic_sdk/components/softdevice/s130/headers/nrf_svc.h:49:45: note: in definition of macro 'SVCALL'
   __attribute__((naked)) static return_type signature \
                                             ^~~~~~~~~

[mbed] ERROR: "/usr/local/opt/python/bin/python2.7" returned error code 1.
[mbed] ERROR: Command "/usr/local/opt/python/bin/python2.7 -u /Users/robmor01/Projects/microbit-component-display/.temp/tools/make.py -t gcc_arm -m NRF51_MICROBIT --source . --build ./BUILD/NRF51_MICROBIT/gcc_arm" in "/Users/robmor01/Projects/microbit-component-display"

Updating to the latest revision of the microbit library doesn't fix the issue.
[Mirrored to Jira]

@thegecko thegecko reopened this Jul 17, 2018
@0xc0170
Copy link
Contributor

0xc0170 commented Aug 1, 2018

@jaustin Can you review this issue? The libraries are 2 years old by looks of it.
[Mirrored to Jira]

@jaustin
Copy link

jaustin commented Aug 1, 2018

@theotherjimmy looked into this a while back, and I thought he had success with building the older programs. There was an inconsistency between the online compiler and the offline one WRT armcc, but that shouldn't be a factor here.... Jimmy, did you bump into any of the issues like Rob has?
[Mirrored to Jira]

@theotherjimmy
Copy link
Contributor

theotherjimmy commented Aug 1, 2018

@jaustin, I did, and I resolved them with a build profile that was like develop, but without disabling VLA.
[Mirrored to Jira]

@awe-devasc
Copy link

awe-devasc commented Aug 2, 2018

I also came across the kind of problem discussed above when trying to build a simple BBC:Microbit C++ program using the mbed-cli ... is there a simple set of instructions and example to show me how to do this please ...
[Mirrored to Jira]

@yennster
Copy link
Contributor

yennster commented Oct 3, 2018

I opened an issue on the microbit-dal repo here: lancaster-university/microbit-dal#393

Still unsure of the proper way I should be building the microbit examples with Mbed CLI

@adbridge
Copy link
Contributor

adbridge commented Nov 1, 2019

Apologies, this was closed in error by the automated bot - re-opening.

@adbridge adbridge reopened this Nov 1, 2019
@ciarmcom ciarmcom closed this as completed Nov 1, 2019
@ciarmcom
Copy link
Member

Internal Jira reference: https://jira.arm.com/browse/IOTBTOOL-480

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests