Home/Support/Support Forum/How to compile my program into RCM4300
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

How to compile my program into RCM4300

+1 vote
I am trying to compile my program written using Dynamic C into the RCM4300. I can RUN the program while the Programming Cable is connected to the RCM4300. But I like to compile it into the RCM4300 so I can disconnect the cable.
Every time I try that it give me an error message saying that no file has been selected. In the "Project Option" menu, I have selected my source file as the "Default Project Source File". But it still does not do it.
Is there anyone who knows how to do that. Do I have to have a memory SD card installed in the RCM4300? I do not have any SD card installed into it.

[Edit]
I also tried "Compile to Target", "Store Program in Flash". It compiles the program and it seems that it stores it into the flash. But it does establish Ethernet communication with the remote computer when I disconnect the programming cable and cycle the power.
Please note that I am able to send data back and forth through the Ethernet interface to the remote computer when the Programming cable is connected.

I do have some "Printf" lines in my program. Should I remove them?

I appreciate any help.

Thanks

Bobby
asked Jan 23, 2019 in Rabbit Software by Bobby1 New to the Community (3 points)
edited Jan 24, 2019 by TomCollins

Please log in or register to answer this question.

1 Answer

0 votes
You do not need to have an SD card installed. And as you figured out, you need to use "Compile to Target" instead of "Compile Project to Target".

You definitely need "compile to target" and "store program in flash" set, unless you are going to compile to a .bin file and upload it to the device with RFU (Rabbit Field Utility).

You can keep your printf() calls in your program -- the application will skip that output when you aren't running a debug build. It's also possible to redirect stdout to a serial port on production builds. See Samples/STDIO_SERIAL.C. If you redirect to serial port A, you can use the "DIAG" connector of the programming cable to monitor the output.

I would try running Samples/RCM4300/FLASHLED1.C or FLASHLED2.C. Compile to the board and make sure it works correct in the debugger. Then disconnect the programming cable and reset the board to see if that works.

Once you have those samples working, you know you've configured the compiler correctly to install a program to the core module, and the board is properly powered/grounded.

You can make use of printf() and redirected STDOUT to debug attempts to run your networking code outside of the debugger.
answered Jan 24, 2019 by TomCollins Veteran of the Digi Community (1,998 points)
I found out the problem. The RCM4300 runs slow in the DEBUG mode when the Programming
Cable is connected. But it runs much faster when the programming cable is not connected.

The problem was the line in the program at sscanf.


        serDread(serbuffer, 20, 100);       

        sscanf (serbuffer, "%s %s %s %s", Zone, TReq, Adafruit_Id, Adafruit_temp);

It seems that the RCM4300 did not have enough time to process the sscanf command.
So I added 3 delays of 300 mSec. One before the    serDread
One after the serDread and one after the    sscanf.

This fixed the problem and now it works in the standalone mode without the programming cable.
...