OpenSky - opensource firmware for FrSky D4R-ii and VD5M - RC Groups
Thread Tools
Sep 07, 2016, 03:24 PM
Registered User
Discussion

OpenSky - opensource firmware for FrSky D4R-ii and VD5M


Hi!

I made some more progress on my Opensource Firmware for FrSky gear.
My firmware can now be built for VD5M and the D4R-ii receiver.
I postet some details on my website: http://fishpepper.de/projects/opensky/

My opensource firmware adds all kind of nice features, e.g. it gives both receivers SBUS support.

I will close the previous seperate posts and add links to this. This will be the main thread regarding my project from now on (old threads vd5m d4r-ii)

Regards,
Simon
Last edited by fishpepper; Sep 07, 2016 at 03:37 PM.
Sign up now
to remove ads between posts
Sep 07, 2016, 05:52 PM
Registered User

Compiling VD5M code


Hi fishpepper:

Can you please comment below:
https://www.rcgroups.com/forums/show...3&postcount=30

Also if possible:
https://www.rcgroups.com/forums/show...5&postcount=31

I'm struggling on both fronts and I'm desperate to make it work

Regards,
Marek
Sep 08, 2016, 12:45 AM
Registered User
Great project .

i also want to flash firmware , but maybe it is big challenge because it need skills .

anyone compiled successful program , please help me sent file inbox .I use Frsky D4r .

thanks
Last edited by rc my life; Sep 08, 2016 at 12:52 AM.
Sep 08, 2016, 10:21 AM
Registered User
Pre-compiled versions would be nice for people who don't want to install all the extra dev environment stuff, yeah.
Sep 08, 2016, 11:57 AM
Did you see that....
blckmn's Avatar
Quote:
Originally Posted by Arakon
Pre-compiled versions would be nice for people who don't want to install all the extra dev environment stuff, yeah.
I think at the moment fishpepper is reluctant to release binaries due to safety. If you're not ready to install the build environment - probably not ready to play it safe etc.
Latest blog entry: NERO - STM32F7 based FC
Sep 08, 2016, 01:54 PM
Registered User
Exactly, right now it is in an early testing stage. I will not post binaries for now. Sorry, you will have to be patient.

@marek:
The unreachable warnings are ok. Try the latest master code, i removed a lot of these warnings in the last weeks. Concerning your flashing problems: it seems like the python code does not get the proper response from the programmer. If you have a raspberry on hand you could try this new raspberry port of the cc programmer: https://github.com/jimmyw/CC2510Lib (see Readme for connections).

Regards,
Simon
Sep 11, 2016, 03:08 AM
Registered User
Quote:
Originally Posted by fishpepper
Exactly, right now it is in an early testing stage. I will not post binaries for now. Sorry, you will have to be patient.

@marek:
The unreachable warnings are ok. Try the latest master code, i removed a lot of these warnings in the last weeks. Concerning your flashing problems: it seems like the python code does not get the proper response from the programmer. If you have a raspberry on hand you could try this new raspberry port of the cc programmer: https://github.com/jimmyw/CC2510Lib (see Readme for connections).

Regards,
Simon
Hi Simon,

Thank you for reply.
I have tested Jimmy's binaries on Raspberry Pi also and getting to a point where flashing fails at "Verification" step so I presume flashing is not done correctly.

I will provide more logs froom Raspberry shortly as I feel I am getting closer

Marek
Sep 11, 2016, 03:37 AM
Registered User
Quote:
Originally Posted by marek.grapiniak
Hi Simon,

Thank you for reply.
I have tested Jimmy's binaries on Raspberry Pi also and getting to a point where flashing fails at "Verification" step so I presume flashing is not done correctly.

I will provide more logs froom Raspberry shortly as I feel I am getting closer

Marek
Hi Simon,
Here is the output of cc_info script:

Quote:
root@raspberrypi:~/CC2510Lib/Python# ./cc_info.py
Hello from ccraspberry
Using CCDebugger on port ccraspberry
182
detected a cc2510f16

Chip information:
Chip ID : 0x8104
Flash size : 16 Kb
SRAM size : 2 Kb
USB : No

Device information:
IEEE Address : 000000000000
PC : 0000

Debug status:
[X] CHIP_ERASE_DONE
[ ] PCON_IDLE
[X] CPU_HALTED
[X] PM_ACTIVE
[ ] HALT_STATUS
[X] DEBUG_LOCKED
[X] OSCILLATOR_STABLE
[ ] STACK_OVERFLOW

Debug config:
[ ] SOFT_POWER_MODE
[ ] TIMERS_OFF
[ ] DMA_PAUSE
[ ] TIMER_SUSPEND
After that I'm trying to use cc_write_flash.py /home/pi/opensky_VD5M.hex with the following result:

Quote:
Hello from ccraspberry
Using CCDebugger on port ccraspberry
182
detected a cc2510f16
> using file /home/pi/opensky_VD5M.hex
> Chip information:
Chip ID : 0x8104
Flash size : 16 Kb
SRAM size : 2 Kb

> Sections in /home/pi/opensky_VD5M.hex:
followed by:

Quote:
0x0096 34 B
0x332a 104 B
0x00be 36 B
0x3392 85 B
0x0089 13 B
0x33e7 237 B
> flash usage: 92.4% (15144 bytes of 16384)
> enter debug:
> flashing page: 0
> 11%: writing page 0 of 15... words_per_flash_page = 512
flashWordSize = 2
[page erased] >> copying data to xdata
>>> loading byte 0 of 1024
>>> loading byte 8 of 1024
>>> loading byte 16 of 1024
>>> loading byte 24 of 1024
>>> loading byte 32 of 1024
>>> loading byte 40 of 1024
>>> loading byte 48 of 1024
>>> loading byte 56 of 1024
>>> loading byte 64 of 1024
>>> loading byte 72 of 1024
>>> loading byte 80 of 1024
>>> loading byte 88 of 1024
>>> loading byte 96 of 1024
>>> loading byte 104 of 1024
>>> loading byte 112 of 1024
>>> loading byte 120 of 1024
>>> loading byte 128 of 1024
>>> loading byte 136 of 1024
>>> loading byte 144 of 1024
>>> loading byte 152 of 1024
>>> loading byte 160 of 1024
>>> loading byte 168 of 1024
>>> loading byte 176 of 1024
>>> loading byte 184 of 1024
>>> loading byte 192 of 1024
>>> loading byte 200 of 1024
>>> loading byte 208 of 1024
>>> loading byte 216 of 1024
>>> loading byte 224 of 1024
>>> loading byte 232 of 1024
>>> loading byte 240 of 1024
>>> loading byte 248 of 1024
>>> loading byte 256 of 1024
>>> loading byte 264 of 1024
>>> loading byte 272 of 1024
>>> loading byte 280 of 1024
>>> loading byte 288 of 1024
>>> loading byte 296 of 1024
>>> loading byte 304 of 1024
>>> loading byte 312 of 1024
>>> loading byte 320 of 1024
>>> loading byte 328 of 1024
>>> loading byte 336 of 1024
>>> loading byte 344 of 1024
>>> loading byte 352 of 1024
>>> loading byte 360 of 1024
>>> loading byte 368 of 1024
>>> loading byte 376 of 1024
>>> loading byte 384 of 1024
>>> loading byte 392 of 1024
>>> loading byte 400 of 1024
>>> loading byte 408 of 1024
>>> loading byte 416 of 1024
>>> loading byte 424 of 1024
>>> loading byte 432 of 1024
>>> loading byte 440 of 1024
>>> loading byte 448 of 1024
>>> loading byte 456 of 1024
>>> loading byte 464 of 1024
>>> loading byte 472 of 1024
>>> loading byte 480 of 1024
>>> loading byte 488 of 1024
>>> loading byte 496 of 1024
>>> loading byte 504 of 1024
>>> loading byte 512 of 1024
>>> loading byte 520 of 1024
>>> loading byte 528 of 1024
>>> loading byte 536 of 1024
>>> loading byte 544 of 1024
>>> loading byte 552 of 1024
>>> loading byte 560 of 1024
>>> loading byte 568 of 1024
>>> loading byte 576 of 1024
>>> loading byte 584 of 1024
>>> loading byte 592 of 1024
>>> loading byte 600 of 1024
>>> loading byte 608 of 1024
>>> loading byte 616 of 1024
>>> loading byte 624 of 1024
>>> loading byte 632 of 1024
>>> loading byte 640 of 1024
>>> loading byte 648 of 1024
>>> loading byte 656 of 1024
>>> loading byte 664 of 1024
>>> loading byte 672 of 1024
>>> loading byte 680 of 1024
>>> loading byte 688 of 1024
>>> loading byte 696 of 1024
>>> loading byte 704 of 1024
>>> loading byte 712 of 1024
>>> loading byte 720 of 1024
>>> loading byte 728 of 1024
>>> loading byte 736 of 1024
>>> loading byte 744 of 1024
>>> loading byte 752 of 1024
>>> loading byte 760 of 1024
>>> loading byte 768 of 1024
>>> loading byte 776 of 1024
>>> loading byte 784 of 1024
>>> loading byte 792 of 1024
>>> loading byte 800 of 1024
>>> loading byte 808 of 1024
>>> loading byte 816 of 1024
>>> loading byte 824 of 1024
>>> loading byte 832 of 1024
>>> loading byte 840 of 1024
>>> loading byte 848 of 1024
>>> loading byte 856 of 1024
>>> loading byte 864 of 1024
>>> loading byte 872 of 1024
>>> loading byte 880 of 1024
>>> loading byte 888 of 1024
>>> loading byte 896 of 1024
>>> loading byte 904 of 1024
>>> loading byte 912 of 1024
>>> loading byte 920 of 1024
>>> loading byte 928 of 1024
>>> loading byte 936 of 1024
>>> loading byte 944 of 1024
>>> loading byte 952 of 1024
>>> loading byte 960 of 1024
>>> loading byte 968 of 1024
>>> loading byte 976 of 1024
>>> loading byte 984 of 1024
>>> loading byte 992 of 1024
>>> loading byte 1000 of 1024
>>> loading byte 1008 of 1024
>>> loading byte 1016 of 1024
>> copying flash routine to xdata
>>> loading byte 0 of 42
>>> loading byte 8 of 42
>>> loading byte 16 of 42
>>> loading byte 24 of 42
>>> loading byte 32 of 42
>>> loading byte 40 of 42
>> executing code
>> page write running . done
done
> 11%: verifying page 0 of 15... >>> reading byte 0 of 1024
>>> reading byte 8 of 1024
>>> reading byte 16 of 1024
>>> reading byte 24 of 1024
>>> reading byte 32 of 1024
>>> reading byte 40 of 1024
>>> reading byte 48 of 1024
>>> reading byte 56 of 1024
>>> reading byte 64 of 1024
>>> reading byte 72 of 1024
>>> reading byte 80 of 1024
>>> reading byte 88 of 1024
>>> reading byte 96 of 1024
>>> reading byte 104 of 1024
>>> reading byte 112 of 1024
>>> reading byte 120 of 1024
>>> reading byte 128 of 1024
>>> reading byte 136 of 1024
>>> reading byte 144 of 1024
>>> reading byte 152 of 1024
>>> reading byte 160 of 1024
>>> reading byte 168 of 1024
>>> reading byte 176 of 1024
>>> reading byte 184 of 1024
>>> reading byte 192 of 1024
>>> reading byte 200 of 1024
>>> reading byte 208 of 1024
>>> reading byte 216 of 1024
>>> reading byte 224 of 1024
>>> reading byte 232 of 1024
>>> reading byte 240 of 1024
>>> reading byte 248 of 1024
>>> reading byte 256 of 1024
>>> reading byte 264 of 1024
>>> reading byte 272 of 1024
>>> reading byte 280 of 1024
>>> reading byte 288 of 1024
>>> reading byte 296 of 1024
>>> reading byte 304 of 1024
>>> reading byte 312 of 1024
>>> reading byte 320 of 1024
>>> reading byte 328 of 1024
>>> reading byte 336 of 1024
>>> reading byte 344 of 1024
>>> reading byte 352 of 1024
>>> reading byte 360 of 1024
>>> reading byte 368 of 1024
>>> reading byte 376 of 1024
>>> reading byte 384 of 1024
>>> reading byte 392 of 1024
>>> reading byte 400 of 1024
>>> reading byte 408 of 1024
>>> reading byte 416 of 1024
>>> reading byte 424 of 1024
>>> reading byte 432 of 1024
>>> reading byte 440 of 1024
>>> reading byte 448 of 1024
>>> reading byte 456 of 1024
>>> reading byte 464 of 1024
>>> reading byte 472 of 1024
>>> reading byte 480 of 1024
>>> reading byte 488 of 1024
>>> reading byte 496 of 1024
>>> reading byte 504 of 1024
>>> reading byte 512 of 1024
>>> reading byte 520 of 1024
>>> reading byte 528 of 1024
>>> reading byte 536 of 1024
>>> reading byte 544 of 1024
>>> reading byte 552 of 1024
>>> reading byte 560 of 1024
>>> reading byte 568 of 1024
>>> reading byte 576 of 1024
>>> reading byte 584 of 1024
>>> reading byte 592 of 1024
>>> reading byte 600 of 1024
>>> reading byte 608 of 1024
>>> reading byte 616 of 1024
>>> reading byte 624 of 1024
>>> reading byte 632 of 1024
>>> reading byte 640 of 1024
>>> reading byte 648 of 1024
>>> reading byte 656 of 1024
>>> reading byte 664 of 1024
>>> reading byte 672 of 1024
>>> reading byte 680 of 1024
>>> reading byte 688 of 1024
>>> reading byte 696 of 1024
>>> reading byte 704 of 1024
>>> reading byte 712 of 1024
>>> reading byte 720 of 1024
>>> reading byte 728 of 1024
>>> reading byte 736 of 1024
>>> reading byte 744 of 1024
>>> reading byte 752 of 1024
>>> reading byte 760 of 1024
>>> reading byte 768 of 1024
>>> reading byte 776 of 1024
>>> reading byte 784 of 1024
>>> reading byte 792 of 1024
>>> reading byte 800 of 1024
>>> reading byte 808 of 1024
>>> reading byte 816 of 1024
>>> reading byte 824 of 1024
>>> reading byte 832 of 1024
>>> reading byte 840 of 1024
>>> reading byte 848 of 1024
>>> reading byte 856 of 1024
>>> reading byte 864 of 1024
>>> reading byte 872 of 1024
>>> reading byte 880 of 1024
>>> reading byte 888 of 1024
>>> reading byte 896 of 1024
>>> reading byte 904 of 1024
>>> reading byte 912 of 1024
>>> reading byte 920 of 1024
>>> reading byte 928 of 1024
>>> reading byte 936 of 1024
>>> reading byte 944 of 1024
>>> reading byte 952 of 1024
>>> reading byte 960 of 1024
>>> reading byte 968 of 1024
>>> reading byte 976 of 1024
>>> reading byte 984 of 1024
>>> reading byte 992 of 1024
>>> reading byte 1000 of 1024
>>> reading byte 1008 of 1024
>>> reading byte 1016 of 1024

ERROR: verification failed!
Can you please have a look and let me know what you think ?
Sep 11, 2016, 03:58 AM
Registered User
Yupp, very hard to sucessfull. So i will patient waiting
Sep 11, 2016, 05:04 AM
Registered User
Hi!

Please try
cc_write_flash.py -e /home/pi/opensky_VD5M.hex
In order to force a full flash erase. This command should erase the chip and upload the data.

Does this work? If not, try to run
cc_read_flash.py flash_content.hex
and send this file and your hex to <myusername> at gmail.com. I will have a look.

Regards,
Simon
Sep 11, 2016, 05:30 AM
Registered User
Quote:
Originally Posted by fishpepper
Hi!

Please try
cc_write_flash.py -e /home/pi/opensky_VD5M.hex
In order to force a full flash erase. This command should erase the chip and upload the data.

Does this work?
I think it worked

Quote:
>>> reading byte 1000 of 1024
>>> reading byte 1008 of 1024
>>> reading byte 1016 of 1024
verify=ok!
> flashing page: 15
> 100%: skipping empty page 15 (0xFF) page
> completed. will start target now
Sep 11, 2016, 05:36 AM
Registered User
Quote:
Originally Posted by marek.grapiniak
I think it worked
I hooked up serial interface to Channel 5.
The output is:

Quote:
!!!!!!!!!!!!!!!!!!!!!!!!! STATS: 0%

CONN LOST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! STATS: 0%

CONN LOST!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Is that expected ?
Sep 11, 2016, 06:21 AM
Registered User
perfect! Now connect Servo1 to GND and reboot / powercylce the target.The vd5m will enter bind mode (you should see this on the debug port). Then bind it to your TX, remove the short and reboot again. It should connect to your tx now
Sep 11, 2016, 09:55 AM
Registered User
Quote:
Originally Posted by fishpepper
perfect! Now connect Servo1 to GND and reboot / powercylce the target.The vd5m will enter bind mode (you should see this on the debug port). Then bind it to your TX, remove the short and reboot again. It should connect to your tx now
I do have a Turnigy 9x with Frsky DJT module. I was able to bind it with VD5M receiver (green led goes solid when I switch the TX)
but....

I have no reactions in debug console while I move the sticks. All I have is :

Quote:
000000!0000000000000000000000000000000000!00000000 STATS: 96%
00000000000000000000000000000000000000000000000000 STATS: 100%
00000000000000000000000000000000000000000000000!00 STATS: 98%
00000000000000000000000000000000000000000000000000 STATS: 100%
00000000000000000000000000000000000000000000000000 STATS: 100%
00000000000000000000000000000000000000000000000000 STATS: 100%
00000000000000000000000000000000000000000000000000 STATS: 100%
00000000000000000000000000000000000000000000000000 STATS: 100%
00000000000000000000000000000000000000000000000000 STATS: 100%
00000000000000000000000000000000000000000000000000 STATS: 100%
00000000000000000000000000000000000000000000000000 STATS: 100%
00000000000000000000000000000000000000000000000000 STATS: 100%
The problem is that I have configured F3 EVO brushed board using CleanFLight but I have no response from TX when moving sticks around

Should I actually see something in Debug console while moving sticks ? All I see is zeros.

Please advise.
Last edited by marek.grapiniak; Sep 11, 2016 at 10:23 AM.
Sep 11, 2016, 10:27 AM
Registered User
The output is perfect. A Zero indicates it received a packet from Antenna0 (1 is for Antenna1, this is not available on vd5m). A "!" means one packet was lost. It also says 100% receiption state.
The default config will output an inverted SBUS signal on the external connector. Did you setup your board correctly (serial rx activated, sbus input selected) ? Connected the right pin?

Additionally: Have a look at your TX, when you get RSSI and ADC readings the module is conected


Quick Reply
Message:

Thread Tools