This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

STM32 RTX Startupfile

Hello,

I am new to STM32 and RTX, and i am following the example:
Modify the device startup file to enable SWI_Handler function:
Comment out the following line from the startup file:
SWI_Handler B SWI_Handler

Add the following line to the startup file:
IMPORT SWI_Handler

But this line is not present in the startup file STM32F10x.s

What do i need to do?

Kasper

Parents
  • Hello,

    Thank you for your answer.

    I was trying this example from the documentation:

    OS_TID tsk_1, tsk2_1, tsk2_2, tsk2_3;
    int cnt;

    void task2 (void) __task { os_dly_wait (2); cnt++;
    }

    void task1 (void) __task { /* This task will create 3 instances of task2 */ tsk2_1 = os_tsk_create (task2, 0); tsk2_2 = os_tsk_create (task2, 0); tsk2_3 = os_tsk_create (task2, 0); /* The job is done, delete 'task1' */ os_tsk_delete_self ();
    }

    int main (void) {

    os_sys_init(task1); for (;;);
    }

    But when i in the simulator put a breakpoint on this line: cnt++; and runt the program, it breaks first time, but not again and it says that this task is overflow...

    it seems like the processor comes to HardFault_Handler\

    what do i do wrong?

    Kasper aka neewbie

Reply
  • Hello,

    Thank you for your answer.

    I was trying this example from the documentation:

    OS_TID tsk_1, tsk2_1, tsk2_2, tsk2_3;
    int cnt;

    void task2 (void) __task { os_dly_wait (2); cnt++;
    }

    void task1 (void) __task { /* This task will create 3 instances of task2 */ tsk2_1 = os_tsk_create (task2, 0); tsk2_2 = os_tsk_create (task2, 0); tsk2_3 = os_tsk_create (task2, 0); /* The job is done, delete 'task1' */ os_tsk_delete_self ();
    }

    int main (void) {

    os_sys_init(task1); for (;;);
    }

    But when i in the simulator put a breakpoint on this line: cnt++; and runt the program, it breaks first time, but not again and it says that this task is overflow...

    it seems like the processor comes to HardFault_Handler\

    what do i do wrong?

    Kasper aka neewbie

Children