8 years, 2 months ago.

device.h is missing


This example (and the BLE Uart Loopback), does not works. It seems that the file device.h is missing.



Question relating to:

To get started with Seeed Tiny BLE, include detecting motion, button and battery level. MPU6050, Seeed_Tiny_BLE

5 Answers

8 years, 1 month ago.

There are some changes on online compiler, so a update of mbed library is required. The update solves the device.h missing problem, but includes GPIOTE_IRQHandler multiply defined issue. This is a conflict between the latest mbed library and the nRF51822 library. We can delete nRF51822/nordic-sdk/components/gpiote/app_gpiote.c to solve the issue.

So, in a summary

1. update mbed, nRF51822, BLE_API libraries

2. delete nRF51822/nordic-sdk/components/gpiote/app_gpiote.c

Accepted Answer
8 years, 2 months ago.

Try updating the mbed lib.

8 years, 1 month ago.

I had the same problem. After updating I started to get a different error. Error: Symbol GPIOTE_IRQHandler multiply defined (by gpio_irq_api.o and app_gpiote.c.SEEED_TINY_BLE.o).

This is normally caused by a definition being placed in a header .h file, when it should be in a .c or .cpp file, so either move the definition or make it extern. Or look here https://developer.mbed.org/questions/7419/Symbol-GPIOTE_IRQHandler-multiply-define/

posted by David Fletcher 21 Apr 2015

It seems to be somewhere deep inside the libs. I don't really want to mess with that. Though it appears to be a known issue so I'll just wait for an update.

posted by Sławomir Błauciak 21 Apr 2015
8 years, 1 month ago.

I had this issue too. I am using an offline compiler so I just added nRF51822\nordic-sdk\components\libraries\gpiote to the excludes list. I guess you could do the same by #if 0 or commenting out the file.

8 years, 1 month ago.

The device.h missing error is almost always caused by an out of date mbed library, that is your board was added after the date on the mbed library in the example. Please right click on the library in the compiler and update to resolve this problem. If you are still having an issue then please post a link to your code so we can try to debug.


posted by Raymond Henick 16 Jul 2015