Using i2c and uart freeRTOS

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Using i2c and uart freeRTOS

1,625 Views
songja
Contributor III

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

pastedImage_1.png

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,

Labels (1)
Tags (4)
0 Kudos
2 Replies

1,290 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi

Please also refer to below link for the memory management in FreeRTOS

FreeRTOS - Memory management options for the FreeRTOS small footprint, professional grade, real time... 

Regards

Daniel

0 Kudos

1,290 Views
mjbcswitzerland
Specialist V

Hi

This looks like a configuration problem - there are a number of heap strategies and you need to define which one you want to use. Presently all are enabled and so the same subroutine is present a number of times so it will fail to link. Check what controls each and disable the ones that you don't want to use.

Regards

Mark

Complete Kinetis solutions for professional needs, training and support:http://www.utasker.com/kinetis.html
Including FreeRTOS integration for all Kinetis parts (with free running UART DMA Rx method)
Kinetis K66:
- http://www.utasker.com/kinetis/TWR-K65F180M.html
- http://www.utasker.com/kinetis/FRDM-K66F.html
- http://www.utasker.com/kinetis/TEENSY_3.6.html
uTasker: supporting >1'000 registered Kinetis users get products faster and cheaper to market
Request Free emergency remote desk-top consulting at http://www.utasker.com/services.html

0 Kudos