9 years, 8 months ago.

I Get This Exact Error While Compiling for the "ST Nucleo F103RB" Platform

Hi There :)

I'm Unable To Compile This Simple Test Program (Created Today) - for The "ST Nucleo F103RB" Platform :

test123

// Flash an LED while waiting for events
 
#include "mbed.h"
#include "cmsis_os.h"

 
InterruptIn event(PC_1);
DigitalOut led(PB_9);

int x;
 
void trigger() {
    x=!x;
}
 
int main() {
    x=1;
    event.rise(&trigger);
    while(1) {
        if (x)
        {
        led = !led;
        wait(0.25);
        }
    }
}

Repeatedly Getting The '#error directive: "no target defined" in "mbed-rtos/rtx/RTX_Conf_CM.c", Line: 59, Col: 6' Error,

Unless I Exclude The mbed-rtos - Simply by Removing Both The Library & It's References Off The Program.

Interestingly Enough, The Above Code Successfully Compile for The "ST Nucleo F401RE" Platform.

Any Ideas as How To Fix This Issue ?

Thanks Ahead :)

p.s. : This Program is Intended to Run on a Similar Development Board To The "ST Nucleo F103RB" - a One Using The Same μC ( STM32F103RBT6 ), Hence The Modified Port Numbers ( PB_9 , PC_1 ).

Question relating to:

The F103 seems not to be supported by RTOS. You can simply try adding the required define in that file (it is roughly same size as the KL25, so should probably use same settings). But I know there have been issues with the ST HAL files using the systick timer, which RTOS also uses, and I don't know if they have been fixed for your target.

posted by Erik - 01 Aug 2014

1 Answer

9 years, 8 months ago.

why #include "cmsis_os.h" is needed? It compiles perfectly without that line.

Before Posting This Question I Also Tried That & It Didn't Work.

posted by Moran Z. 01 Aug 2014