I did porting of Amazon FreeRTOS libraries into MPLAB Harmony project together with demo files.
My harmony configuration was as close as I could understand from system_config.g and other system_xxx files. Then for the rest I just replaced with harmony version configurations with the ones from the AWS demo including WILC1000 drivers.
So my device seems to be running demo ok, I receive Hello world messages and the ACK ones too. But serial print out is messed up.
I get lines like :
[Echoing] Message returned with ACK: 'H57 4351 [MQTT] MQTT Publish was successful.
or
88 9391 [Echoing] Message returned with ACK: 'H85 9391 [MQTT] MQTT Publish was successful.
86 9391 [MQTT] Notifying task.
87 9391 [Echoing] Command sent to MQTT task p; 9411 [MQTT] Received message 0 from queue.
Or like this last one
158 24471 [MQTTEcho] Echo successfully published 'Hello World 4'
159 24501 [Echoing] Sending command to MQTT task.
160 24501 [MQTT] Received message 0 from queue.
161 24502 [Echoing] Sending command to MQTT task.
162 24502 [MQTT] Received message c0000 from queue.
163 24571 [IP-task] Socket sending wakeup to MQTT task.
164 24571 [MQTT] Received message 0 from queue.
165 24610 [IP-task] Socket sending wakeup to MQTT task.
166 24610 [MQTT] Received message 0 from queue.
167 24631 [Echoing] Command sent to MQTT task passed.
172 24631 [Echoing] Message returned with ACK: 'H169 24631 [MQTT] MQTT Publish was successful.
170 24631 [MQTT] Notifying task.
171 24631 [Echoing] Command sent to MQTT task passed.
172 24631 [Echoing] Message returned with ACK: 'Hello World 4 ACK'
It seems that part of the string is being messed with. Or like in this last sample it seems like there is a repetition of messages as there is message returned with ACK 'H169 and only after that Hello World 4 ACK.
I never really worked with SPI DMA if that could be something or maybe somewhere buffers are missing things. I am not sure.
Could someone help me our or have any ideas?
I also included full demo printouts in the attachments.
Thank you for sharing those files. It seems that the output from two different tasks is getting intermingled. Are you using aws_logging_task_dynamic_buffers or are you directly printing output? The logging task should be the only task printing to serial.
Yes, I am using aws_logging_task_dynamic_buffers and only configPRINTF() in my tasks. I am also including FreeRTOS configuration files where configPRINTF is being defined.
main.c is identical as from AWS demo. The way I include my other custom apps is inside aws_demo_runner.c but this happens without using any custom apps. Inside Harmony configurations I set up as in the attached picture. Just console and debug system services.
That seems correct. At this point it looks like we need to take a closer look. Will you create a minimal project to demonstrate the problem and share with us so that we can take a look?
I discovered that one of the mistakes. I was using BufferAllocation_2.c from
lib/FreeRTOS-Plus-TCP/source/portable/BufferManagement/BufferAllocation_2.c
and now I replaced with
lib/FreeRTOS-Plus-TCP/source/portable/NetworkInterface/pic32mzef/BufferAllocation_2.c
Things got way better. But still every few minutes some random character messsages. But not every second message as it used to be.
I just cleared out aws_clientcredential.h, aws_clieantcredential_keys.h and aws_codesign_keys.h
[https://s3.amazonaws.com/file-sharing-public/Migration_AWS.zip]
MPLAB harmony paths should be set accordingly and I used AWS library relative paths from AWS demo folder next to migration app folder.