AnsweredAssumed Answered

Using i2c and uart freeRTOS

Question asked by JAEYONG SONG on Jun 20, 2019
Latest reply on Jun 20, 2019 by Daniel Chen

Hello,

 

I have tried to include both i2c and UART freeRTOS to send data out thru UART.

But as soon as I include UART freeRTOS, it throws errors as below.

 

Description Resource Path Location Type

 

first defined here heap_1.c /frdmk66f_freertos_i2c/amazon-freertos/FreeRTOS/portable line 71 C/C++ Problem
first defined here heap_1.c /frdmk66f_freertos_i2c/amazon-freertos/FreeRTOS/portable line 123 C/C++ Problem
first defined here heap_1.c /frdmk66f_freertos_i2c/amazon-freertos/FreeRTOS/portable line 135 C/C++ Problem
first defined here heap_1.c /frdmk66f_freertos_i2c/amazon-freertos/FreeRTOS/portable line 142 C/C++ Problem
first defined here heap_4.c /frdmk66f_freertos_i2c/amazon-freertos/FreeRTOS/portable line 318 C/C++ Problem
make: *** [frdmk66f_freertos_i2c.axf] Error 1 frdmk66f_freertos_i2c C/C++ Problem
multiple definition of `pvPortMalloc' heap_2.c /frdmk66f_freertos_i2c/amazon-freertos/FreeRTOS/portable line 119 C/C++ Problem
multiple definition of `pvPortMalloc' heap_3.c /frdmk66f_freertos_i2c/amazon-freertos/FreeRTOS/portable line 59 C/C++ Problem
multiple definition of `pvPortMalloc' heap_4.c /frdmk66f_freertos_i2c/amazon-freertos/FreeRTOS/portable line 114 C/C++ Problem
multiple definition of `pvPortMalloc' heap_5.c /frdmk66f_freertos_i2c/amazon-freertos/FreeRTOS/portable line 133 C/C++ Problem
multiple definition of `vPortFree' heap_2.c /frdmk66f_freertos_i2c/amazon-freertos/FreeRTOS/portable line 211 C/C++ Problem
multiple definition of `vPortFree' heap_3.c /frdmk66f_freertos_i2c/amazon-freertos/FreeRTOS/portable line 84 C/C++ Problem
multiple definition of `vPortFree' heap_4.c /frdmk66f_freertos_i2c/amazon-freertos/FreeRTOS/portable line 264 C/C++ Problem
multiple definition of `vPortFree' heap_5.c /frdmk66f_freertos_i2c/amazon-freertos/FreeRTOS/portable line 273 C/C++ Problem
multiple definition of `vPortInitialiseBlocks' heap_2.c /frdmk66f_freertos_i2c/amazon-freertos/FreeRTOS/portable line 244 C/C++ Problem
multiple definition of `vPortInitialiseBlocks' heap_4.c /frdmk66f_freertos_i2c/amazon-freertos/FreeRTOS/portable line 324 C/C++ Problem
multiple definition of `xPortGetFreeHeapSize' heap_2.c /frdmk66f_freertos_i2c/amazon-freertos/FreeRTOS/portable line 238 C/C++ Problem
multiple definition of `xPortGetFreeHeapSize' heap_4.c /frdmk66f_freertos_i2c/amazon-freertos/FreeRTOS/portable line 312 C/C++ Problem
multiple definition of `xPortGetFreeHeapSize' heap_5.c /frdmk66f_freertos_i2c/amazon-freertos/FreeRTOS/portable line 321 C/C++ Problem
multiple definition of `xPortGetMinimumEverFreeHeapSize' heap_5.c /frdmk66f_freertos_i2c/amazon-freertos/FreeRTOS/portable line 327 C/C++ Problem

 

 

 

I have tried the example code for k66f, "frdmk66f_freertos_i2c". simply by just adding the uart rtos driver and it failed to compile. But when I created a new project then tried the same without any code from the example, it worked.

So I assume that it must be something to do with the code?

 

Is there any other way to implement both i2c and uart on RTOS?

 

Thank you in advance.

 

Regards,

Outcomes