Porting FreeRTOS to Arduino MEGA 2560 Rev3 (ATmega2560) - c++

I'm currently implementing a FreeRTOS-based program on the Arduino platform.
I would like to use the Arduino MEGA 2560 Rev3 (which is based on an ATmega2560) for this project, but I couldn't find a working port.c file.
Could anyone please share a working port.c ?
I'm using Eclipse IDE, WinAVR, AVR Plugin, Arduino Lib, FreeRTOS 7.6.0 (I will eventually switch to v8.0.0) and C++ as the main programming language.
Thanks.
EDIT:
I've came across avrfreertos which generates a FreeRTOS static library for the ATmega2560, but when I link my project against it, I get the following error:
c:/winavr-20100110/bin/../lib/gcc/avr/4.3.3/../../../../avr/bin/ld.exe: section .task [00003282 -> 0000328f] overlaps section .data [00003282 -> 0000339d]
make: *** [MY_PROJECT_NAME.elf] Error 1
EDIT:
I found a fix for the linking problem
http://sourceforge.net/p/avrfreertos/discussion/general/thread/f0552383/
http://feilipu.me/2011/09/22/freertos-and-libraries-for-avr-atmega/comment-page-1/#comment-14

Your issue is resolved by the change to avr6.x as you found. There is a .task attribute included in the portmacro.h file, which is needed to keep the freeRTOS task you define in the lower part of flash.
Good news. There are some updates in the latest avrbinutils and avrlibc 1.8.0 that include a .lowtext attribute, which has similar functionality to the .task attribute I added to the avr6.x file.
In the port for freeRTOS800 I changed the attribute defined in portmacro.h to point to .lowtext. This means there is no need to change the avr6.x file any more.
Either, change to use the freeRTOS800 port AVRfreeRTOS or just make the change in portmacro.h yourself.
For further reference, I've made an Arduino Library that can be included in Arduino to get experience with freeRTOS on any AVR device.

Related

F tensorflow/core/common_runtime/device_factory.cc:77] Duplicate registration of device factory for type GPU with the same priority 210

When excute my binary c++ file, this error happened.
I compile my c++ file with tensorflow_cc.so by using make all, and the version of tensorflow is 1.8.
Does anyone have met this problem?
We recently encountered this error. It happened when we inadvertently linked against both libtensorflow.so (-ltensorflow) and libtensorflow_cc.so (-ltensorflow_cc). It went away when we picked one.

Arduino Makefile: How to save sensor data to file in the computer?

I am using a command-line interface package called Arduino Makefile on Linux. I set up a sensor on Arduino Uno to print temperature and humidity data to an LCD.
I have already searched for possible solutions such as Save to CSV file from Arduino, which has code that is repeated on different websites and forums such as researchgate.
I tried using their code. However, the code line:
import processing.serial.*;
gives me the error:
thermo.ino:3:1: error: ‘import’ does not name a type
import processing.serial.*;
^
How would this error be solved? Or is there another way to save the sensor data into a file stored in my computer?
By the way, my computer is directly connected to the Arduino Uno using a USB cable.
The problem is that you are running that code in the Arduino IDE but you have to run it in the Processing IDE.
Download processing from here.
Then download the libraries for Processing here.
Unzip the library and copy the "Arduino" folder into the "libraries" sub-folder of your Processing Sketchbook. In my case "C:\Users\Ricardo\Documents\Processing\libraries".
Now execute the first code that you get from the tutorial that you mentioned before in the Arduino IDE. Execute the second code from that page in the Processing IDE.
That should work!
Note:
This link is pretty useful

Where is "nvinfer.h" from tensorrt located?

I have been trying to compile a basic tensorRT project on a desktop host -for now the source is literally just the following:
#include <nvinfer.h>
class Logger : nvinfer1::public ILogger
{
} glogger;
Upon running make, though, I receive the following message:
fatal error: nvinfer.h: No such file or directory #include <nvinfer.h>
The error is correct, too - I used locate to try to find it, but there's nothing on my machine that matches. I followed the install instructions for desktop installation of TensorRT 2.1 as described here: https://developer.nvidia.com/nvidia-tensorrt-download
So my question is, does anyone know where nvinfer.h is supposed to be? In other words, am I missing a needed package that contains it, or did I miss something else that's essential?
Small addendum: one thing I noticed is that libgie1 is not installed, and it was not included as a debian with the provided TensorRT download like the other packages such as gie-dev were.
Before using locate, if you recently added new files is a good practice to run sudo updatedb, if the file is on the pc you should see it after.
Anyway googling a bit it looks like the header your looking for is NvInfer.h, caps matters.

MobileVLCKit Not work with Live555 library

I need MobileVLCKit player and live555 streamer both in same ios project.
I successfully build library and merge into same iOS project. But VLC player getting crashed at below line on code in live555.cpp
error: Execution was interrupted, reason: EXC_BAD_ACCESS (code=1, address=0xbadd9b286bcebea0).
The process has been returned to the state before expression evaluation.
At source code in file live555.cpp
p_sys->rtsp->sendOptionsCommand( &continueAfterOPTIONS, &authenticator );
live555.cpp file path in MobileVLCKit
MobileVLCKit/ImportedSources/vlc/modules/access/live555.cpp
Please help me. I am struct here from last 2-3 days.
MobileVLCKit includes liblive555 as well so assuming that you are statically linking, only one can win due to symbol collisions. Consider to link MobileVLCKit dynamically instead or make sure to include liblive555 only once per binary.

EDSDK cpp error: 10 EDS_ERR_MISSING_SUBCOMPONENT

I am trying to get started with EDSDK to control my Canon 500D. I'm new to cpp, and windows XP apps and I'm using visual studio. After a great deal of blind trial and error I have finally managed to get the app to compile the basic sample code from the documentation. To do this I have the EDSDK.h, EDSDKTypes.h and EDSDKErrors.h headers in the right places and the EDSDK.dll and EDSDK.lib in the same folder as the code. It seems to be picking these up. I have got the 500D to be recognised by the PC so I believe the USB drivers are there.
The code is just trying to pick up the camera:
EdsError err=EDS_ERR_OK;
EdsCameraListRef cameraList=NULL;
err = EdsGetCameraList(&cameraList);
if(err == EDS_ERR_OK)
{...}
However, when I run this console app the error is picked up as 10 - which suggests, according to the document, that there is a missing subcomponent. This happens both if the camera is connected or not, so I'm thinking this is something missing from the compile. But I am getting nowhere with the documentation.
I have installed the edsdk 2.4 Windows version from a download not the official route, so this may be an issue.
Can anyone help? Specifically how can I find out what the missing subcomponent might be so I might include it. Is this a subcmponent of the build like a header file or something like a driver?
I know, old question but still it might help someone with the same problem.
From the documentation:
All DLLs are required in order to execute an EDSDK client application.
All of the modules in the DLL folder must be copied into the same folder where the EDSDK client application is in.
This means you'll have to have all DLLs beside your *.exe. Namely these DLLs:
DPPDLL.dll
DPPLibCom.dll
DPPRSC.dll
EDSDK.dll
EdsImage.dll
Mlib.dll
Ucs32P.dll