LibrePilot Forum
Development => Hardware => Topic started by: vv on April 14, 2016, 02:35:23 pm
-
I have built the uploader, it connects to the serial port but does nothing. What am I doing wrong?
-
Hi, welcome.
What are you trying to do, and which board do you use ?
You cannot use GCS ?
-
I am using cc3d. I have Succesfully built the firmware, bootlaoder, uploader. Thats all I need to build, right? Then I try to uplaod to the board using the command
OPUploaderTool -p build/firmware/fw_coptercontrol/fw_coptercontrol.opfw -v -t /dev/ttyACM0
And all I get is
librepilot git:(develop) ✗ OPUploaderTool -p build/firmware/fw_coptercontrol/fw_coptercontrol.opfw -v -t /dev/ttyACM0
OpenPilot serial firmware uploader tool.
Connect the board
[==================================================] 100%
Connect the board NOW
Uplaoding works fine using librepilot and bootloader is version 4.
Thanks!
-
Thats all I need to build, right?
Not sure... how do you configure the board ?
You may need the GCS.
-
Uploader is not indended to be used on anything but OP Gps V9.
Other boards does not supports serial updating right now.
-
The configuration stays in the EEPROM, unless deleted manualy? How does one setup the development environment then?
-
You can ask erase after a rescue or simply Upgrade&Erase
On next boot, flash/config is erased. It take some time with CC3D, maybe around 20s
Take a look here:
https://librepilot.atlassian.net/wiki/display/LPDOC/Firmware+Tab
How does one setup the development environment then?
Can you explain what you ask please ?
-
To create a development environment you need to know the basics of how to compile, build, debug, upload the program. I haven't stumbled upon an open source project that didn't have these capabilities using command line tools. I am sure LibrePilot is no different.
A typical procedure to build the project is by running make
, or making a target, which in my case is make fw_coptercontrol
. This builds the binary/hex files that are later uploaded to the cc3d board.
A typycal command to uplaod the firmware (binary/hex files from the step above) is make uplaod
. In this project I found that the upload procedure isn't implemented in the Makfile (did I miss it?). Later I found out that there is an uploader tool that I can build called OPUploderTool, that is supposed to do the job. Unfortunately it gets stuck for some reason, thats why I came for your help. @a_morale Says it is not intended to be used on anything but OP Gps V9. So how do I upload using the command line tools?
For a developer debugging is a very big of a deal and it is important to document how it is done. How does one output some debug data to a PC. That would be other question.
Where and/or is there documentation written on how to compile, build upload/run and debug the firmware? If not, can someone please explain?
Here is an example from ArduPilot's documentation on how to do it http://copter.ardupilot.org/dev/docs/building-px4-for-linux-with-make.html. Dev's don't use GUI tools to flash firmware, which is where you pointed me. Just like any other open source project, it needs absolutely no GUI tools to develop, especially flash firmware.
If there is anything else unclear, please let me know. I am just trying to contribute to the open source community, free of charge, so that everyone can benefit from it. It is really hard to do without a decent documentation or some help from the devs.
-
Have you checked the developer section in the wiki?
This gives detailed instructions on how to build:
https://librepilot.atlassian.net/wiki/display/LPDOC/Linux+-+Building+and+Packaging
The firmware upload is made via the firmware Tab in GCS, as stated above.
You need X for that.
-
This is where instructions/documentation for my question is supposed to be https://librepilot.atlassian.net/wiki/display/LPDOC/Firmware+development . The page is empty. The link you gave me, I know about it, but it has almost nothing to do with what I am asking for. The link you gave me is for building and packaging the GCS, not flashing firmware.
-
Some sort of command line programming can be done using dfu-util, but not for CC3D.
make ef_revolution_dfu
There is no command line for flashing firmware.
Maybe your first contribution to matches other projects ? You're welcome :)
See files attached, maybe you got help here.
You can also use the debug console and output messages to one port set as DebugConsole (main, flexi or VCP)
look at ./flight/targets/boards/coptercontrol/firmware/inc/pios_config.h for DEBUG_CONSOLE and DEBUG_LEVEL
-
Thanks, this info helps. I will be definitely creating a CLI tool for flashing firmware. I can't have GCS runnign and going through 50 clicks to upload a firmware. It has to be done with a single command in the terminal! :)
Why I started to want to contribute to the project is because I realized there is a significant lag in the outputs from RC commands, like .2 - .4 secs. Even manual too! I think I already know where the problem is. I know that the CPU is more than powerful enough to do it without lag. Any other advice to start developing for librepilot?
I still find it hard to accept that the only way to flash firmware is using the GUI tool. How do devs develop for cc3d?
-
I can't have GCS runnign and going through 50 clicks to upload a firmware.
It takes at most four clicks to upload firmware if I count the double click to start the app ;)
/F
-
0.2s is a pretty important lag for RC input.
How/Where do you measure this value, which RC input do you use ?
If you want to contribute start with a fork from here:
https://bitbucket.org/librepilot
Next, add a JIRA here:
https://librepilot.atlassian.net/issues/
Look also the .commit-template and finally create a pull request from your bitbucket repo after you pushed a branch / fix
More details here:
https://github.com/librepilot/LibrePilot/wiki/Git-Workflow
-
I still find it hard to accept that the only way to flash firmware is using the GUI tool. How do devs develop for cc3d?
The best is to use SWD since you can debug the board directly from gdb/eclipse as well as upload new firmware.
-
I guess SWD is the way to go. Not bad of an option eather ;)
Do you know if J-link programmer will work as well as ST-link?