8 years, 7 months ago.

Where can I find the "defines" like "LED1"?

I'm looking at the mDot "Hello World" program https://developer.mbed.org/teams/MultiTech/code/mDot_helloworld/ and I'm trying to understand where it picks up its definition for "LED1" especially since
a) replacing "LED1" with "LED2", etc., in the code does not compile, and
b) the LED actually flashing is marked D3 on the board

I expect it to be in a some kind of HAL or .h file - can someone point me to where that would be?

I'm running the mDot on and UDK2 (full size)

Thanks.

1 Answer

8 years, 7 months ago.

Not a user of mDOT but these Multitech modules are MBED based so you will need to review your MBED enabled target board details for their respective hardware definitions.

Suggest to review the following source code:

https://github.com/mbedmicro/mbed/tree/8b5dd6eb6bc9752a2bbe97eb3d6ace4660d30489/libraries/mbed/targets/hal

assuming you have a ST micro based target board:

https://github.com/mbedmicro/mbed/tree/8b5dd6eb6bc9752a2bbe97eb3d6ace4660d30489/libraries/mbed/targets/hal/TARGET_STM

assuming you have a STMF4 CPU on your target board:

https://github.com/mbedmicro/mbed/tree/8b5dd6eb6bc9752a2bbe97eb3d6ace4660d30489/libraries/mbed/targets/hal/TARGET_STM/TARGET_STM32F4

CPU = F411RE with MDOT:

https://github.com/mbedmicro/mbed/tree/8b5dd6eb6bc9752a2bbe97eb3d6ace4660d30489/libraries/mbed/targets/hal/TARGET_STM/TARGET_STM32F4/TARGET_MTS_MDOT_F411RE

Review the pinNames.h for full details:

https://github.com/mbedmicro/mbed/blob/8b5dd6eb6bc9752a2bbe97eb3d6ace4660d30489/libraries/mbed/targets/hal/TARGET_STM/TARGET_STM32F4/TARGET_MTS_MDOT_F411RE/PinNames.h

    // needed for mbed to build tests
    LED1        = PA_0,

Accepted Answer

Generally LED1 till LED4 are defined, even if they have fewer LEDs. Guess they didn't follow that convention.

posted by Erik - 29 Mar 2016