ARMmbed / mbed-events

DEPRECATED! This project has moved to mbed-os
https://github.com/ARMmbed/mbed-os/tree/master/events
Apache License 2.0
11 stars 6 forks source link

[RC5 OoB] mbed-events doesn't compile with non Cortex-M platform #11

Closed toyowata closed 8 years ago

toyowata commented 8 years ago

How to reproduce:

mbed import https://github.com/ARMmbed/mbed-os-example-ble
mbed update mbed-os-5.1.0-rc5
cd BLE_URIBeacon
# Add RZ_A1H config in the mbed_app.json
mbed compile -m RZ_A1H -t ARM

I got errors below.

C:\Users\toywat01\Documents\GitHub\mbed-os-example-ble\BLE_URIBeacon>mbed compile -m RZ_A1H -t ARM
Building project BLE_URIBeacon (RZ_A1H, ARM)
Scan: .
Scan: FEATURE_BLE
Scan: FEATURE_CLIENT
Scan: FEATURE_COMMON_PAL
Scan: FEATURE_UVISOR
Scan: FEATURE_STORAGE
Scan: mbed
Scan: env
Compile: events.c
Compile: events_mbed.cpp
[Error] events_mbed.cpp@48,0:  #20: identifier "__get_PRIMASK" is undefined
[Error] events_mbed.cpp@53,0:  #20: identifier "__set_PRIMASK" is undefined
[ERROR] ".\mbed-events\events-c\events_mbed.cpp", line 48: Error:  #20: identifier "__get_PRIMASK" is undefined
".\mbed-events\events-c\events_mbed.cpp", line 53: Error:  #20: identifier "__set_PRIMASK" is undefined
.\mbed-events\events-c\events_mbed.cpp: 0 warnings, 2 errors

[mbed] ERROR: "python" returned error code 1.
[mbed] ERROR: Command "python -u C:\Users\toywat01\Documents\GitHub\mbed-os-example-ble\BLE_URIBeacon\mbed-os\tools\make.py -t ARM -m RZ_A1H --source . --build .\.build\RZ_A1H\ARM" in "C:\Users\toywat01\Documents\GitHub\mbed-os-example-ble\BLE_URIBeacon"

---

cc @geky @pan- @sg-

geky commented 8 years ago

Ah, this would be because using the __enable_irq/__disable_irq directly. I believe the enter/exit critical functions weren't available at the time. Thanks for reporting this bug, this should be an easy fix.

geky commented 8 years ago

12 should fix this issue, let me know if I'm wrong. I compiled for the RZ_A1H locally, I'll be able to run tests on the platform in a bit.