Hi,
Trying to get the "CDC_VCOM_VCOM_freertos" USB virtual COM port example running. SDK 2.7 or 2.8 tested, under 11.1.1 and 11.2.0. Target FRDM-K22F
2.7 compiles and runs fine using default configs when importing the project, e.g. redlib. But, when I add driver and config pins for i2c, the freertos kernel breaks like below, what is the connection here, and how can I resolve it? Any ideas?
../amazon-freertos/freertos_kernel/portable/MemMang/heap_useNewlib.c:53:10: fatal error: malloc.h: No such file or directory
#include <malloc.h> // mallinfo...
^~~~~~~~~~
compilation terminated.
Finished building: ../amazon-freertos/freertos_kernel/portable/MemMang/heap_2.c
Finished building: ../board/pin_mux.c
make: *** [amazon-freertos/freertos_kernel/portable/MemMang/subdir.mk:36: amazon-freertos/freertos_kernel/portable/MemMang/heap_useNewlib.o] Error 1
make: *** Waiting for unfinished jobs....
Trying to build from the 2.8 SDK fails with the following, btw
frdmk22f_dev_composite_cdc_vcom_cdc_vcom_freertos\component\osa/fsl_os_abstraction.h:339:10: fatal error: fsl_os_abstraction_free_rtos.h: No such file or directory
#include "fsl_os_abstraction_free_rtos.h"
The file is not in the project directory either
已解决! 转到解答。
Thanks for the feedback. I found now that for 11.1.1 and the 2.7 SDK, when adding the i2c drivers and configuring the pins via MCUXpresso, that the following files where added under amazon-freertos\freertos_kernel\portable\MemMang causing the build to break. Removing these the build completes:
heap_1.c, heap_2.c, heap_3.c, heap_5c and heap_useNewlib.c
Hi thomas.gunnarsrud@vicotee.com,
How are you adding the I2C pins/drivers? I use the I2C driver with I2C in FreeRTOS with SDK 2.7.0 on the FRDM-K22F without any issues.
As discussed in Compilation error there are problems when you add a driver to a project using "SDK Manager" - after you get something working (ie USB CDC driver) you should create a new project with the additional drivers for the added functionality. That's how I did it (unintentionally) and didn't have any issues.
Good luck,
myke
Thanks for the feedback. I found now that for 11.1.1 and the 2.7 SDK, when adding the i2c drivers and configuring the pins via MCUXpresso, that the following files where added under amazon-freertos\freertos_kernel\portable\MemMang causing the build to break. Removing these the build completes:
heap_1.c, heap_2.c, heap_3.c, heap_5c and heap_useNewlib.c