CRSF protocol for TBS Crossfire?

ersky9xr is the port of the er9x firmware to the 9XRPRO radio.
grifild
Posts: 22
Joined: Tue May 25, 2021 12:35 pm
Country: -

Re: CRSF protocol for TBS Crossfire?

Post by grifild »

Thanks Mike! I changed these lines and built the firmware. But unfortunately when I select the XFIRE protocol, ar9x reboots.

grifild
Posts: 22
Joined: Tue May 25, 2021 12:35 pm
Country: -

Re: CRSF protocol for TBS Crossfire?

Post by grifild »

MikeB wrote: Tue May 25, 2021 6:42 pm That only changes eepskye, not the radio itself.
In menus.cpp find:

Code: Select all

#ifdef PCBSKY
 #ifdef REVX
const uint8_t ProtocolOptions[2][7] = { {3,PROTO_PPM,PROTO_DSM2,PROTO_MULTI}, {6,PROTO_PPM,PROTO_PXX,PROTO_DSM2,PROTO_MULTI,PROTO_XFIRE,PROTO_SBUS} };
 #else
const uint8_t ProtocolOptions[2][5] = { {3,PROTO_PPM,PROTO_DSM2,PROTO_MULTI}, {4,PROTO_PPM,PROTO_PXX,PROTO_DSM2,PROTO_MULTI} };
 #endif
#endif
and change to:

Code: Select all

#ifdef PCBSKY
 #ifdef REVX
const uint8_t ProtocolOptions[2][7] = { {3,PROTO_PPM,PROTO_DSM2,PROTO_MULTI}, {6,PROTO_PPM,PROTO_PXX,PROTO_DSM2,PROTO_MULTI,PROTO_XFIRE,PROTO_SBUS} };
 #else
const uint8_t ProtocolOptions[2][6] = { {3,PROTO_PPM,PROTO_DSM2,PROTO_MULTI}, {5,PROTO_PPM,PROTO_PXX,PROTO_DSM2,PROTO_MULTI,PROTO_XFIRE} };
 #endif
#endif
(don't miss the subscript size change from 5 to 6!).

Mike
I have try to build erskyTx from source several times and each time when I selected CRSF protocol, TX had rebooted (all other function works good with XJT module). I tried with diode and without diode. Now I have Crossfire MicroTX module v2 and Crossfire inverter (400K ftw) that comes with this module for hardware mod Taranis Q7. I think if I solder this module to the AR9X it must work with Crossfire and ExpressLRS, but I don't know where is inverter at AR9X board and where I should solder it. Maybe you can help me?
Thank you in advance!
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: CRSF protocol for TBS Crossfire?

Post by MikeB »

I've attached the schematic for the AR9X board (a .pdf file but zipped up). There is also a.jpg file that shows the header connections.

Mike
Attachments
ar9x_RevB_flygear.zip
(197.41 KiB) Downloaded 266 times
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
grifild
Posts: 22
Joined: Tue May 25, 2021 12:35 pm
Country: -

Re: CRSF protocol for TBS Crossfire?

Post by grifild »

MikeB wrote: Wed Jul 07, 2021 9:36 am I've attached the schematic for the AR9X board (a .pdf file but zipped up). There is also a.jpg file that shows the header connections.

Mike
Thank you, Mike! From this schematic I understood that I need to solder 'in' of the inverter to s.port (tp17) and 'out' to TX1 before transistor inverter (tp9), am I right (see picture)? After making all soldering and removing diode, transmitter still go to reboot when I selecting "CRSF" protocol and I also lose ability to flash receivers through S.Port (it worked fine when diode installed between s.port an tx_rs232 pins). Maybe it's problem in my way of making firmware from the source code? Because after "make" I received several "Warnings" in the console:
photo_2021-07-08_00-28-57.jpg
(191.95 KiB) Not downloaded yet
Here is my log of building

Code: Select all

Generate Version-stamp:
arm-none-eabi-gcc -c -mcpu=cortex-m3 -Os -gdwarf-2 -mthumb -fomit-frame-pointer -Wall -Wstrict-prototypes -fverbose-asm  -Dat91sam3s8 -DRUN_FROM_FLASH=1 -DBASIC  -DPCBSKY  -DREVB -DUSB_JOYSTICK -DSTAMP -DCPUARM -MD -MP -MF obj_ersky9x/core_cm3.o.d -I . -I./sky/joy/inc core_cm3.c -o obj_ersky9x/core_cm3.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -Os -gdwarf-2 -mthumb -fomit-frame-pointer -Wall -Wstrict-prototypes -fverbose-asm  -Dat91sam3s8 -DRUN_FROM_FLASH=1 -DBASIC  -DPCBSKY  -DREVB -DUSB_JOYSTICK -DSTAMP -DCPUARM -MD -MP -MF obj_ersky9x/board_lowlevel.o.d -I . -I./sky/joy/inc board_lowlevel.c -o obj_ersky9x/board_lowlevel.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -Os -gdwarf-2 -mthumb -fomit-frame-pointer -Wall -Wstrict-prototypes -fverbose-asm  -Dat91sam3s8 -DRUN_FROM_FLASH=1 -DBASIC  -DPCBSKY  -DREVB -DUSB_JOYSTICK -DSTAMP -DCPUARM -MD -MP -MF obj_ersky9x/crt.o.d -I . -I./sky/joy/inc crt.c -o obj_ersky9x/crt.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -Os -gdwarf-2 -mthumb -fomit-frame-pointer -Wall -Wstrict-prototypes -fverbose-asm  -Dat91sam3s8 -DRUN_FROM_FLASH=1 -DBASIC  -DPCBSKY  -DREVB -DUSB_JOYSTICK -DSTAMP -DCPUARM -MD -MP -MF obj_ersky9x/vectors_sam3s.o.d -I . -I./sky/joy/inc vectors_sam3s.c -o obj_ersky9x/vectors_sam3s.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -Os -gdwarf-2 -mthumb -fomit-frame-pointer -Wall -Wstrict-prototypes -fverbose-asm  -Dat91sam3s8 -DRUN_FROM_FLASH=1 -DBASIC  -DPCBSKY  -DREVB -DUSB_JOYSTICK -DSTAMP -DCPUARM -MD -MP -MF obj_ersky9x/port.o.d -I . -I./sky/joy/inc port.c -o obj_ersky9x/port.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -Os -gdwarf-2 -mthumb -fomit-frame-pointer -Wall -Wstrict-prototypes -fverbose-asm  -Dat91sam3s8 -DRUN_FROM_FLASH=1 -DBASIC  -DPCBSKY  -DREVB -DUSB_JOYSTICK -DSTAMP -DCPUARM -MD -MP -MF obj_ersky9x/coos.o.d -I . -I./sky/joy/inc coos.c -o obj_ersky9x/coos.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -Os -gdwarf-2 -mthumb -fomit-frame-pointer -Wall -Wstrict-prototypes -fverbose-asm  -Dat91sam3s8 -DRUN_FROM_FLASH=1 -DBASIC  -DPCBSKY  -DREVB -DUSB_JOYSTICK -DSTAMP -DCPUARM -MD -MP -MF obj_ersky9x/HIDDJoystickDriver.o.d -I . -I./sky/joy/inc sky/joy/HIDDJoystickDriver.c -o obj_ersky9x/HIDDJoystickDriver.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -Os -gdwarf-2 -mthumb -fomit-frame-pointer -Wall -Wstrict-prototypes -fverbose-asm  -Dat91sam3s8 -DRUN_FROM_FLASH=1 -DBASIC  -DPCBSKY  -DREVB -DUSB_JOYSTICK -DSTAMP -DCPUARM -MD -MP -MF obj_ersky9x/HIDDFunction.o.d -I . -I./sky/joy/inc sky/joy/HIDDFunction.c -o obj_ersky9x/HIDDFunction.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -Os -gdwarf-2 -mthumb -fomit-frame-pointer -Wall -Wstrict-prototypes -fverbose-asm  -Dat91sam3s8 -DRUN_FROM_FLASH=1 -DBASIC  -DPCBSKY  -DREVB -DUSB_JOYSTICK -DSTAMP -DCPUARM -MD -MP -MF obj_ersky9x/USBDDriver.o.d -I . -I./sky/joy/inc sky/joy/USBDDriver.c -o obj_ersky9x/USBDDriver.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -Os -gdwarf-2 -mthumb -fomit-frame-pointer -Wall -Wstrict-prototypes -fverbose-asm  -Dat91sam3s8 -DRUN_FROM_FLASH=1 -DBASIC  -DPCBSKY  -DREVB -DUSB_JOYSTICK -DSTAMP -DCPUARM -MD -MP -MF obj_ersky9x/USBD.o.d -I . -I./sky/joy/inc sky/joy/USBD.c -o obj_ersky9x/USBD.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -Os -gdwarf-2 -mthumb -fomit-frame-pointer -Wall -Wstrict-prototypes -fverbose-asm  -Dat91sam3s8 -DRUN_FROM_FLASH=1 -DBASIC  -DPCBSKY  -DREVB -DUSB_JOYSTICK -DSTAMP -DCPUARM -MD -MP -MF obj_ersky9x/USBRequests.o.d -I . -I./sky/joy/inc sky/joy/USBRequests.c -o obj_ersky9x/USBRequests.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -Os -gdwarf-2 -mthumb -fomit-frame-pointer -Wall -Wstrict-prototypes -fverbose-asm  -Dat91sam3s8 -DRUN_FROM_FLASH=1 -DBASIC  -DPCBSKY  -DREVB -DUSB_JOYSTICK -DSTAMP -DCPUARM -MD -MP -MF obj_ersky9x/USBDescriptors.o.d -I . -I./sky/joy/inc sky/joy/USBDescriptors.c -o obj_ersky9x/USBDescriptors.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -Os -gdwarf-2 -mthumb -fomit-frame-pointer -Wall -Wstrict-prototypes -fverbose-asm  -Dat91sam3s8 -DRUN_FROM_FLASH=1 -DBASIC  -DPCBSKY  -DREVB -DUSB_JOYSTICK -DSTAMP -DCPUARM -MD -MP -MF obj_ersky9x/USBDDriverCallbacks.o.d -I . -I./sky/joy/inc sky/joy/USBDDriverCallbacks.c -o obj_ersky9x/USBDDriverCallbacks.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -Os -gdwarf-2 -mthumb -fomit-frame-pointer -Wall -Wstrict-prototypes -fverbose-asm  -Dat91sam3s8 -DRUN_FROM_FLASH=1 -DBASIC  -DPCBSKY  -DREVB -DUSB_JOYSTICK -DSTAMP -DCPUARM -MD -MP -MF obj_ersky9x/USBDCallbacks.o.d -I . -I./sky/joy/inc sky/joy/USBDCallbacks.c -o obj_ersky9x/USBDCallbacks.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -Os -gdwarf-2 -mthumb -fomit-frame-pointer -Wall -Wstrict-prototypes -fverbose-asm  -Dat91sam3s8 -DRUN_FROM_FLASH=1 -DBASIC  -DPCBSKY  -DREVB -DUSB_JOYSTICK -DSTAMP -DCPUARM -MD -MP -MF obj_ersky9x/HIDIdleRequest.o.d -I . -I./sky/joy/inc sky/joy/HIDIdleRequest.c -o obj_ersky9x/HIDIdleRequest.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -Os -gdwarf-2 -mthumb -fomit-frame-pointer -Wall -Wstrict-prototypes -fverbose-asm  -Dat91sam3s8 -DRUN_FROM_FLASH=1 -DBASIC  -DPCBSKY  -DREVB -DUSB_JOYSTICK -DSTAMP -DCPUARM -MD -MP -MF obj_ersky9x/HIDReportRequest.o.d -I . -I./sky/joy/inc sky/joy/HIDReportRequest.c -o obj_ersky9x/HIDReportRequest.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -Os -gdwarf-2 -mthumb -fomit-frame-pointer -Wall -Wstrict-prototypes -fverbose-asm  -Dat91sam3s8 -DRUN_FROM_FLASH=1 -DBASIC  -DPCBSKY  -DREVB -DUSB_JOYSTICK -DSTAMP -DCPUARM -MD -MP -MF obj_ersky9x/HIDDTransferDriver.o.d -I . -I./sky/joy/inc sky/joy/HIDDTransferDriver.c -o obj_ersky9x/HIDDTransferDriver.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -Os -gdwarf-2 -mthumb -fomit-frame-pointer -Wall -Wstrict-prototypes -fverbose-asm  -Dat91sam3s8 -DRUN_FROM_FLASH=1 -DBASIC  -DPCBSKY  -DREVB -DUSB_JOYSTICK -DSTAMP -DCPUARM -MD -MP -MF obj_ersky9x/USBD_HAL.o.d -I . -I./sky/joy/inc sky/joy/USBD_HAL.c -o obj_ersky9x/USBD_HAL.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -Os -gdwarf-2 -mthumb -fomit-frame-pointer -Wall -Wstrict-prototypes -fverbose-asm  -Dat91sam3s8 -DRUN_FROM_FLASH=1 -DBASIC  -DPCBSKY  -DREVB -DUSB_JOYSTICK -DSTAMP -DCPUARM -MD -MP -MF obj_ersky9x/pmc.o.d -I . -I./sky/joy/inc sky/joy/pmc.c -o obj_ersky9x/pmc.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -Os -gdwarf-2 -mthumb -fomit-frame-pointer -Wall -Wstrict-prototypes -fverbose-asm  -Dat91sam3s8 -DRUN_FROM_FLASH=1 -DBASIC  -DPCBSKY  -DREVB -DUSB_JOYSTICK -DSTAMP -DCPUARM -MD -MP -MF obj_ersky9x/device_descriptor.o.d -I . -I./sky/joy/inc sky/joy/device_descriptor.c -o obj_ersky9x/device_descriptor.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -Os -gdwarf-2 -mthumb -fomit-frame-pointer -Wall -fverbose-asm  -Dat91sam3s8 -DRUN_FROM_FLASH=1 -DBASIC  -DPCBSKY  -DREVB -DUSB_JOYSTICK -DSTAMP -DCPUARM -MD -MP -MF obj_ersky9x/stamp.o.d -fno-exceptions -I . -I./sky/joy/inc stamp.cpp -o obj_ersky9x/stamp.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -Os -gdwarf-2 -mthumb -fomit-frame-pointer -Wall -fverbose-asm  -Dat91sam3s8 -DRUN_FROM_FLASH=1 -DBASIC  -DPCBSKY  -DREVB -DUSB_JOYSTICK -DSTAMP -DCPUARM -MD -MP -MF obj_ersky9x/drivers.o.d -fno-exceptions -I . -I./sky/joy/inc drivers.cpp -o obj_ersky9x/drivers.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -Os -gdwarf-2 -mthumb -fomit-frame-pointer -Wall -fverbose-asm  -Dat91sam3s8 -DRUN_FROM_FLASH=1 -DBASIC  -DPCBSKY  -DREVB -DUSB_JOYSTICK -DSTAMP -DCPUARM -MD -MP -MF obj_ersky9x/sdcard_driver.o.d -fno-exceptions -I . -I./sky/joy/inc sdcard_driver.cpp -o obj_ersky9x/sdcard_driver.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -Os -gdwarf-2 -mthumb -fomit-frame-pointer -Wall -fverbose-asm  -Dat91sam3s8 -DRUN_FROM_FLASH=1 -DBASIC  -DPCBSKY  -DREVB -DUSB_JOYSTICK -DSTAMP -DCPUARM -MD -MP -MF obj_ersky9x/ff.o.d -fno-exceptions -I . -I./sky/joy/inc ff.cpp -o obj_ersky9x/ff.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -Os -gdwarf-2 -mthumb -fomit-frame-pointer -Wall -fverbose-asm  -Dat91sam3s8 -DRUN_FROM_FLASH=1 -DBASIC  -DPCBSKY  -DREVB -DUSB_JOYSTICK -DSTAMP -DCPUARM -MD -MP -MF obj_ersky9x/sound.o.d -fno-exceptions -I . -I./sky/joy/inc sky/sound.cpp -o obj_ersky9x/sound.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -Os -gdwarf-2 -mthumb -fomit-frame-pointer -Wall -fverbose-asm  -Dat91sam3s8 -DRUN_FROM_FLASH=1 -DBASIC  -DPCBSKY  -DREVB -DUSB_JOYSTICK -DSTAMP -DCPUARM -MD -MP -MF obj_ersky9x/diskio.o.d -fno-exceptions -I . -I./sky/joy/inc sky/diskio.cpp -o obj_ersky9x/diskio.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -Os -gdwarf-2 -mthumb -fomit-frame-pointer -Wall -fverbose-asm  -Dat91sam3s8 -DRUN_FROM_FLASH=1 -DBASIC  -DPCBSKY  -DREVB -DUSB_JOYSTICK -DSTAMP -DCPUARM -MD -MP -MF obj_ersky9x/power.o.d -fno-exceptions -I . -I./sky/joy/inc sky/power.cpp -o obj_ersky9x/power.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -Os -gdwarf-2 -mthumb -fomit-frame-pointer -Wall -fverbose-asm  -Dat91sam3s8 -DRUN_FROM_FLASH=1 -DBASIC  -DPCBSKY  -DREVB -DUSB_JOYSTICK -DSTAMP -DCPUARM -MD -MP -MF obj_ersky9x/serial.o.d -fno-exceptions -I . -I./sky/joy/inc sky/serial.cpp -o obj_ersky9x/serial.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -Os -gdwarf-2 -mthumb -fomit-frame-pointer -Wall -fverbose-asm  -Dat91sam3s8 -DRUN_FROM_FLASH=1 -DBASIC  -DPCBSKY  -DREVB -DUSB_JOYSTICK -DSTAMP -DCPUARM -MD -MP -MF obj_ersky9x/lcd.o.d -fno-exceptions -I . -I./sky/joy/inc lcd.cpp -o obj_ersky9x/lcd.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -Os -gdwarf-2 -mthumb -fomit-frame-pointer -Wall -fverbose-asm  -Dat91sam3s8 -DRUN_FROM_FLASH=1 -DBASIC  -DPCBSKY  -DREVB -DUSB_JOYSTICK -DSTAMP -DCPUARM -MD -MP -MF obj_ersky9x/file.o.d -fno-exceptions -I . -I./sky/joy/inc file.cpp -o obj_ersky9x/file.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -Os -gdwarf-2 -mthumb -fomit-frame-pointer -Wall -fverbose-asm  -Dat91sam3s8 -DRUN_FROM_FLASH=1 -DBASIC  -DPCBSKY  -DREVB -DUSB_JOYSTICK -DSTAMP -DCPUARM -MD -MP -MF obj_ersky9x/templates.o.d -fno-exceptions -I . -I./sky/joy/inc templates.cpp -o obj_ersky9x/templates.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -Os -gdwarf-2 -mthumb -fomit-frame-pointer -Wall -fverbose-asm  -Dat91sam3s8 -DRUN_FROM_FLASH=1 -DBASIC  -DPCBSKY  -DREVB -DUSB_JOYSTICK -DSTAMP -DCPUARM -MD -MP -MF obj_ersky9x/pers.o.d -fno-exceptions -I . -I./sky/joy/inc pers.cpp -o obj_ersky9x/pers.o
pers.cpp:56:2: warning: taking address of packed member of 't_EEGeneral' may result in an unaligned pointer value [-Waddress-of-packed-member]
   56 |  &g_eeGeneral.calibMid[0],
      |  ^~~~~~~~~~~~~~~~~~~~~~~~
pers.cpp:57:2: warning: taking address of packed member of 't_EEGeneral' may result in an unaligned pointer value [-Waddress-of-packed-member]
   57 |  &g_eeGeneral.calibMid[1],
      |  ^~~~~~~~~~~~~~~~~~~~~~~~
pers.cpp:58:2: warning: taking address of packed member of 't_EEGeneral' may result in an unaligned pointer value [-Waddress-of-packed-member]
   58 |  &g_eeGeneral.calibMid[2],
      |  ^~~~~~~~~~~~~~~~~~~~~~~~
pers.cpp:59:2: warning: taking address of packed member of 't_EEGeneral' may result in an unaligned pointer value [-Waddress-of-packed-member]
   59 |  &g_eeGeneral.calibMid[3],
      |  ^~~~~~~~~~~~~~~~~~~~~~~~
pers.cpp:60:2: warning: taking address of packed member of 't_EEGeneral' may result in an unaligned pointer value [-Waddress-of-packed-member]
   60 |  &g_eeGeneral.calibMid[4],
      |  ^~~~~~~~~~~~~~~~~~~~~~~~
pers.cpp:61:2: warning: taking address of packed member of 't_EEGeneral' may result in an unaligned pointer value [-Waddress-of-packed-member]
   61 |  &g_eeGeneral.calibMid[5],
      |  ^~~~~~~~~~~~~~~~~~~~~~~~
pers.cpp:62:2: warning: taking address of packed member of 't_EEGeneral' may result in an unaligned pointer value [-Waddress-of-packed-member]
   62 |  &g_eeGeneral.calibMid[6],
      |  ^~~~~~~~~~~~~~~~~~~~~~~~
pers.cpp:63:2: warning: taking address of packed member of 't_EEGeneral' may result in an unaligned pointer value [-Waddress-of-packed-member]
   63 |  &g_eeGeneral.x9dcalibMid,
      |  ^~~~~~~~~~~~~~~~~~~~~~~~
pers.cpp:78:2: warning: taking address of packed member of 't_EEGeneral' may result in an unaligned pointer value [-Waddress-of-packed-member]
   78 |  &g_eeGeneral.xcalibMid[0],
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~
pers.cpp:79:2: warning: taking address of packed member of 't_EEGeneral' may result in an unaligned pointer value [-Waddress-of-packed-member]
   79 |  &g_eeGeneral.xcalibMid[1],
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~
pers.cpp:80:2: warning: taking address of packed member of 't_EEGeneral' may result in an unaligned pointer value [-Waddress-of-packed-member]
   80 |  &g_eeGeneral.xcalibMid[2],
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~
pers.cpp:86:2: warning: taking address of packed member of 't_EEGeneral' may result in an unaligned pointer value [-Waddress-of-packed-member]
   86 |  &g_eeGeneral.calibSpanPos[0],
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
pers.cpp:87:2: warning: taking address of packed member of 't_EEGeneral' may result in an unaligned pointer value [-Waddress-of-packed-member]
   87 |  &g_eeGeneral.calibSpanPos[1],
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
pers.cpp:88:2: warning: taking address of packed member of 't_EEGeneral' may result in an unaligned pointer value [-Waddress-of-packed-member]
   88 |  &g_eeGeneral.calibSpanPos[2],
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
pers.cpp:89:2: warning: taking address of packed member of 't_EEGeneral' may result in an unaligned pointer value [-Waddress-of-packed-member]
   89 |  &g_eeGeneral.calibSpanPos[3],
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
pers.cpp:90:2: warning: taking address of packed member of 't_EEGeneral' may result in an unaligned pointer value [-Waddress-of-packed-member]
   90 |  &g_eeGeneral.calibSpanPos[4],
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
pers.cpp:91:2: warning: taking address of packed member of 't_EEGeneral' may result in an unaligned pointer value [-Waddress-of-packed-member]
   91 |  &g_eeGeneral.calibSpanPos[5],
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
pers.cpp:92:2: warning: taking address of packed member of 't_EEGeneral' may result in an unaligned pointer value [-Waddress-of-packed-member]
   92 |  &g_eeGeneral.calibSpanPos[6],
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
pers.cpp:93:2: warning: taking address of packed member of 't_EEGeneral' may result in an unaligned pointer value [-Waddress-of-packed-member]
   93 |  &g_eeGeneral.x9dcalibSpanPos,
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
pers.cpp:108:2: warning: taking address of packed member of 't_EEGeneral' may result in an unaligned pointer value [-Waddress-of-packed-member]
  108 |  &g_eeGeneral.xcalibSpanPos[0],
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pers.cpp:109:2: warning: taking address of packed member of 't_EEGeneral' may result in an unaligned pointer value [-Waddress-of-packed-member]
  109 |  &g_eeGeneral.xcalibSpanPos[1],
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pers.cpp:110:2: warning: taking address of packed member of 't_EEGeneral' may result in an unaligned pointer value [-Waddress-of-packed-member]
  110 |  &g_eeGeneral.xcalibSpanPos[2],
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pers.cpp:116:2: warning: taking address of packed member of 't_EEGeneral' may result in an unaligned pointer value [-Waddress-of-packed-member]
  116 |  &g_eeGeneral.calibSpanNeg[0],
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
pers.cpp:117:2: warning: taking address of packed member of 't_EEGeneral' may result in an unaligned pointer value [-Waddress-of-packed-member]
  117 |  &g_eeGeneral.calibSpanNeg[1],
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
pers.cpp:118:2: warning: taking address of packed member of 't_EEGeneral' may result in an unaligned pointer value [-Waddress-of-packed-member]
  118 |  &g_eeGeneral.calibSpanNeg[2],
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
pers.cpp:119:2: warning: taking address of packed member of 't_EEGeneral' may result in an unaligned pointer value [-Waddress-of-packed-member]
  119 |  &g_eeGeneral.calibSpanNeg[3],
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
pers.cpp:120:2: warning: taking address of packed member of 't_EEGeneral' may result in an unaligned pointer value [-Waddress-of-packed-member]
  120 |  &g_eeGeneral.calibSpanNeg[4],
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
pers.cpp:121:2: warning: taking address of packed member of 't_EEGeneral' may result in an unaligned pointer value [-Waddress-of-packed-member]
  121 |  &g_eeGeneral.calibSpanNeg[5],
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
pers.cpp:122:2: warning: taking address of packed member of 't_EEGeneral' may result in an unaligned pointer value [-Waddress-of-packed-member]
  122 |  &g_eeGeneral.calibSpanNeg[6],
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
pers.cpp:123:2: warning: taking address of packed member of 't_EEGeneral' may result in an unaligned pointer value [-Waddress-of-packed-member]
  123 |  &g_eeGeneral.x9dcalibSpanNeg,
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
pers.cpp:138:2: warning: taking address of packed member of 't_EEGeneral' may result in an unaligned pointer value [-Waddress-of-packed-member]
  138 |  &g_eeGeneral.xcalibSpanNeg[0],
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pers.cpp:139:2: warning: taking address of packed member of 't_EEGeneral' may result in an unaligned pointer value [-Waddress-of-packed-member]
  139 |  &g_eeGeneral.xcalibSpanNeg[1],
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pers.cpp:140:2: warning: taking address of packed member of 't_EEGeneral' may result in an unaligned pointer value [-Waddress-of-packed-member]
  140 |  &g_eeGeneral.xcalibSpanNeg[2],
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pers.cpp: In function 'uint16_t evalChkSum()':
pers.cpp:148:31: warning: taking address of packed member of 't_EEGeneral' may result in an unaligned pointer value [-Waddress-of-packed-member]
  148 |  p = ( uint16_t *)g_eeGeneral.calibMid ;
      |                   ~~~~~~~~~~~~^~~~~~~~
arm-none-eabi-gcc -c -mcpu=cortex-m3 -Os -gdwarf-2 -mthumb -fomit-frame-pointer -Wall -fverbose-asm  -Dat91sam3s8 -DRUN_FROM_FLASH=1 -DBASIC  -DPCBSKY  -DREVB -DUSB_JOYSTICK -DSTAMP -DCPUARM -MD -MP -MF obj_ersky9x/menus.o.d -fno-exceptions -I . -I./sky/joy/inc menus.cpp -o obj_ersky9x/menus.o
menus.cpp: In function 'VoiceAlarmData* voiceAddress(uint32_t, uint8_t)':
menus.cpp:8572:16: warning: taking address of packed member of 't_EEGeneral' may result in an unaligned pointer value [-Waddress-of-packed-member]
 8572 |  return mode ? &g_eeGeneral.gvad[index] : ( ( index >= NUM_VOICE_ALARMS) ? &g_model.vadx[index - NUM_VOICE_ALARMS] : &g_model.vad[index] ) ;
      |                ^~~~~~~~~~~~~~~~~~~~~~~~
menus.cpp:8572:76: warning: taking address of packed member of 'te_ModelData' may result in an unaligned pointer value
-Waddress-of-packed-member]
 8572 |  return mode ? &g_eeGeneral.gvad[index] : ( ( index >= NUM_VOICE_ALARMS) ? &g_model.vadx[index - NUM_VOICE_ALARMS] : &g_model.vad[index] ) ;
      |                                                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
menus.cpp:8572:118: warning: taking address of packed member of 'te_ModelData' may result in an unaligned pointer value [-Waddress-of-packed-member]
 8572 | g_eeGeneral.gvad[index] : ( ( index >= NUM_VOICE_ALARMS) ? &g_model.vadx[index - NUM_VOICE_ALARMS] : &g_model.vad[index] ) ;
      |                                                                                                      ^~~~~~~~~~~~~~~~~~~

menus.cpp: In function 'void menuProcVoiceOne(uint8_t)':
menus.cpp:8714:10: warning: taking address of packed member of 't_EEGeneral' may result in an unaligned pointer value [-Waddress-of-packed-member]
 8714 |   pvad = &g_eeGeneral.gvad[z] ;
      |          ^~~~~~~~~~~~~~~~~~~~
menus.cpp:8720:44: warning: taking address of packed member of 'te_ModelData' may result in an unaligned pointer value
-Waddress-of-packed-member]
 8720 |   pvad = (s_currIdx >= NUM_VOICE_ALARMS) ? &g_model.vadx[s_currIdx - NUM_VOICE_ALARMS] : &g_model.vad[s_currIdx] ;
      |                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
menus.cpp:8720:90: warning: taking address of packed member of 'te_ModelData' may result in an unaligned pointer value
-Waddress-of-packed-member]
 8720 |   pvad = (s_currIdx >= NUM_VOICE_ALARMS) ? &g_model.vadx[s_currIdx - NUM_VOICE_ALARMS] : &g_model.vad[s_currIdx
 ;
      |                                                                                          ^~~~~~~~~~~~~~~~~~~~~~
menus.cpp: In function 'void menuVoice(uint8_t, uint8_t)':
menus.cpp:9251:12: warning: taking address of packed member of 't_EEGeneral' may result in an unaligned pointer value [-Waddress-of-packed-member]
 9251 |     pvad = &g_eeGeneral.gvad[k] ;
      |            ^~~~~~~~~~~~~~~~~~~~
menus.cpp:9257:38: warning: taking address of packed member of 'te_ModelData' may result in an unaligned pointer value
-Waddress-of-packed-member]
 9257 |     pvad = (k >= NUM_VOICE_ALARMS) ? &g_model.vadx[k - NUM_VOICE_ALARMS] : &g_model.vad[k] ;
      |                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
menus.cpp:9257:76: warning: taking address of packed member of 'te_ModelData' may result in an unaligned pointer value
-Waddress-of-packed-member]
 9257 |     pvad = (k >= NUM_VOICE_ALARMS) ? &g_model.vadx[k - NUM_VOICE_ALARMS] : &g_model.vad[k] ;
      |                                                                            ^~~~~~~~~~~~~~~
In file included from menus.cpp:27:
menus.cpp: In function 'void menuProcText(uint8_t)':
ersky9x.h:219:33: warning: 'char* strncpy(char*, const char*, size_t)' output truncated before terminating nul copying 14 bytes from a string of the same length [-Wstringop-truncation]
  219 | #define strncpy_P(a,b,c) strncpy(a,b,c)
      |                          ~~~~~~~^~~~~~~
menus.cpp:19455:5: note: in expansion of macro 'strncpy_P'
19455 |     strncpy_P( (char *)&SharedMemory.TextControl.TextMenuBuffer[63+3], XPSTR("No Notes Found"), 14 );
      |     ^~~~~~~~~
arm-none-eabi-gcc -c -mcpu=cortex-m3 -Os -gdwarf-2 -mthumb -fomit-frame-pointer -Wall -fverbose-asm  -Dat91sam3s8 -DRUN_FROM_FLASH=1 -DBASIC  -DPCBSKY  -DREVB -DUSB_JOYSTICK -DSTAMP -DCPUARM -MD -MP -MF obj_ersky9x/mixer.o.d -fno-exceptions -I . -I./sky/joy/inc mixer.cpp -o obj_ersky9x/mixer.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -Os -gdwarf-2 -mthumb -fomit-frame-pointer -Wall -fverbose-asm  -Dat91sam3s8 -DRUN_FROM_FLASH=1 -DBASIC  -DPCBSKY  -DREVB -DUSB_JOYSTICK -DSTAMP -DCPUARM -MD -MP -MF obj_ersky9x/frsky.o.d -fno-exceptions -I . -I./sky/joy/inc frsky.cpp -o obj_ersky9x/frsky.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -Os -gdwarf-2 -mthumb -fomit-frame-pointer -Wall -fverbose-asm  -Dat91sam3s8 -DRUN_FROM_FLASH=1 -DBASIC  -DPCBSKY  -DREVB -DUSB_JOYSTICK -DSTAMP -DCPUARM -MD -MP -MF obj_ersky9x/audio.o.d -fno-exceptions -I . -I./sky/joy/inc audio.cpp -o obj_ersky9x/audio.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -Os -gdwarf-2 -mthumb -fomit-frame-pointer -Wall -fverbose-asm  -Dat91sam3s8 -DRUN_FROM_FLASH=1 -DBASIC  -DPCBSKY  -DREVB -DUSB_JOYSTICK -DSTAMP -DCPUARM -MD -MP -MF obj_ersky9x/ersky9x.o.d -fno-exceptions -I . -I./sky/joy/inc ersky9x.cpp -o obj_ersky9x/ersky9x.o
ersky9x.cpp: In function 'void processVoiceAlarms()':
ersky9x.cpp:5447:25: warning: taking address of packed member of 'te_ModelData' may result in an unaligned pointer value [-Waddress-of-packed-member]
 5447 |  VoiceAlarmData *pvad = &g_model.vad[0] ;
      |                         ^~~~~~~~~~~~~~~
ersky9x.cpp:5471:11: warning: taking address of packed member of 'te_ModelData' may result in an unaligned pointer value [-Waddress-of-packed-member]
 5471 |    pvad = &g_model.vadx[0] ;
      |           ^~~~~~~~~~~~~~~~
ersky9x.cpp:5475:11: warning: taking address of packed member of 't_EEGeneral' may result in an unaligned pointer value [-Waddress-of-packed-member]
 5475 |    pvad = &g_eeGeneral.gvad[0] ;
      |           ^~~~~~~~~~~~~~~~~~~~
arm-none-eabi-gcc -c -mcpu=cortex-m3 -Os -gdwarf-2 -mthumb -fomit-frame-pointer -Wall -fverbose-asm  -Dat91sam3s8 -DRUN_FROM_FLASH=1 -DBASIC  -DPCBSKY  -DREVB -DUSB_JOYSTICK -DSTAMP -DCPUARM -MD -MP -MF obj_ersky9x/timers.o.d -fno-exceptions -I . -I./sky/joy/inc timers.cpp -o obj_ersky9x/timers.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -Os -gdwarf-2 -mthumb -fomit-frame-pointer -Wall -fverbose-asm  -Dat91sam3s8 -DRUN_FROM_FLASH=1 -DBASIC  -DPCBSKY  -DREVB -DUSB_JOYSTICK -DSTAMP -DCPUARM -MD -MP -MF obj_ersky9x/logicio.o.d -fno-exceptions -I . -I./sky/joy/inc logicio.cpp -o obj_ersky9x/logicio.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -Os -gdwarf-2 -mthumb -fomit-frame-pointer -Wall -fverbose-asm  -Dat91sam3s8 -DRUN_FROM_FLASH=1 -DBASIC  -DPCBSKY  -DREVB -DUSB_JOYSTICK -DSTAMP -DCPUARM -MD -MP -MF obj_ersky9x/pulses.o.d -fno-exceptions -I . -I./sky/joy/inc pulses.cpp -o obj_ersky9x/pulses.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -Os -gdwarf-2 -mthumb -fomit-frame-pointer -Wall -fverbose-asm  -Dat91sam3s8 -DRUN_FROM_FLASH=1 -DBASIC  -DPCBSKY  -DREVB -DUSB_JOYSTICK -DSTAMP -DCPUARM -MD -MP -MF obj_ersky9x/bluetooth.o.d -fno-exceptions -I . -I./sky/joy/inc bluetooth.cpp -o obj_ersky9x/bluetooth.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -Os -gdwarf-2 -mthumb -fomit-frame-pointer -Wall -fverbose-asm  -Dat91sam3s8 -DRUN_FROM_FLASH=1 -DBASIC  -DPCBSKY  -DREVB -DUSB_JOYSTICK -DSTAMP -DCPUARM -MD -MP -MF obj_ersky9x/pulses_driver.o.d -fno-exceptions -I . -I./sky/joy/inc sky/pulses_driver.cpp -o obj_ersky9x/pulses_driver.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -Os -gdwarf-2 -mthumb -fomit-frame-pointer -Wall -fverbose-asm  -Dat91sam3s8 -DRUN_FROM_FLASH=1 -DBASIC  -DPCBSKY  -DREVB -DUSB_JOYSTICK -DSTAMP -DCPUARM -MD -MP -MF obj_ersky9x/en.o.d -fno-exceptions -I . -I./sky/joy/inc en.cpp -o obj_ersky9x/en.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -Os -gdwarf-2 -mthumb -fomit-frame-pointer -Wall -fverbose-asm  -Dat91sam3s8 -DRUN_FROM_FLASH=1 -DBASIC  -DPCBSKY  -DREVB -DUSB_JOYSTICK -DSTAMP -DCPUARM -MD -MP -MF obj_ersky9x/de.o.d -fno-exceptions -I . -I./sky/joy/inc de.cpp -o obj_ersky9x/de.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -Os -gdwarf-2 -mthumb -fomit-frame-pointer -Wall -fverbose-asm  -Dat91sam3s8 -DRUN_FROM_FLASH=1 -DBASIC  -DPCBSKY  -DREVB -DUSB_JOYSTICK -DSTAMP -DCPUARM -MD -MP -MF obj_ersky9x/fr.o.d -fno-exceptions -I . -I./sky/joy/inc fr.cpp -o obj_ersky9x/fr.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -Os -gdwarf-2 -mthumb -fomit-frame-pointer -Wall -fverbose-asm  -Dat91sam3s8 -DRUN_FROM_FLASH=1 -DBASIC  -DPCBSKY  -DREVB -DUSB_JOYSTICK -DSTAMP -DCPUARM -MD -MP -MF obj_ersky9x/loadboot.o.d -fno-exceptions -I . -I./sky/joy/inc loadboot.cpp -o obj_ersky9x/loadboot.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -Os -gdwarf-2 -mthumb -fomit-frame-pointer -Wall -fverbose-asm  -Dat91sam3s8 -DRUN_FROM_FLASH=1 -DBASIC  -DPCBSKY  -DREVB -DUSB_JOYSTICK -DSTAMP -DCPUARM -MD -MP -MF obj_ersky9x/maintenance.o.d -fno-exceptions -I . -I./sky/joy/inc maintenance.cpp -o obj_ersky9x/maintenance.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -Os -gdwarf-2 -mthumb -fomit-frame-pointer -Wall -fverbose-asm  -Dat91sam3s8 -DRUN_FROM_FLASH=1 -DBASIC  -DPCBSKY  -DREVB -DUSB_JOYSTICK -DSTAMP -DCPUARM -MD -MP -MF obj_ersky9x/mavlink.o.d -fno-exceptions -I . -I./sky/joy/inc mavlink.cpp -o obj_ersky9x/mavlink.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -Os -gdwarf-2 -mthumb -fomit-frame-pointer -Wall -fverbose-asm  -Dat91sam3s8 -DRUN_FROM_FLASH=1 -DBASIC  -DPCBSKY  -DREVB -DUSB_JOYSTICK -DSTAMP -DCPUARM -MD -MP -MF obj_ersky9x/sbus.o.d -fno-exceptions -I . -I./sky/joy/inc sbus.cpp -o obj_ersky9x/sbus.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -Os -gdwarf-2 -mthumb -fomit-frame-pointer -Wall -fverbose-asm  -Dat91sam3s8 -DRUN_FROM_FLASH=1 -DBASIC  -DPCBSKY  -DREVB -DUSB_JOYSTICK -DSTAMP -DCPUARM -MD -MP -MF obj_ersky9x/pxx2.o.d -fno-exceptions -I . -I./sky/joy/inc pxx2.cpp -o obj_ersky9x/pxx2.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -Os -gdwarf-2 -mthumb -fomit-frame-pointer -Wall -fverbose-asm  -Dat91sam3s8 -DRUN_FROM_FLASH=1 -DBASIC  -DPCBSKY  -DREVB -DUSB_JOYSTICK -DSTAMP -DCPUARM -MD -MP -MF obj_ersky9x/logs.o.d -fno-exceptions -I . -I./sky/joy/inc logs.cpp -o obj_ersky9x/logs.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -Os -gdwarf-2 -mthumb -fomit-frame-pointer -Wall -fverbose-asm  -Dat91sam3s8 -DRUN_FROM_FLASH=1 -DBASIC  -DPCBSKY  -DREVB -DUSB_JOYSTICK -DSTAMP -DCPUARM -MD -MP -MF obj_ersky9x/parser.o.d -fno-exceptions -I . -I./sky/joy/inc basic/parser.cpp -o obj_ersky9x/parser.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -Os -gdwarf-2 -mthumb -fomit-frame-pointer -Wall -fverbose-asm  -Dat91sam3s8 -DRUN_FROM_FLASH=1 -DBASIC  -DPCBSKY  -DREVB -DUSB_JOYSTICK -DSTAMP -DCPUARM -MD -MP -MF obj_ersky9x/no.o.d -fno-exceptions -I . -I./sky/joy/inc no.cpp -o obj_ersky9x/no.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -Os -gdwarf-2 -mthumb -fomit-frame-pointer -Wall -fverbose-asm  -Dat91sam3s8 -DRUN_FROM_FLASH=1 -DBASIC  -DPCBSKY  -DREVB -DUSB_JOYSTICK -DSTAMP -DCPUARM -MD -MP -MF obj_ersky9x/se.o.d -fno-exceptions -I . -I./sky/joy/inc se.cpp -o obj_ersky9x/se.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -Os -gdwarf-2 -mthumb -fomit-frame-pointer -Wall -fverbose-asm  -Dat91sam3s8 -DRUN_FROM_FLASH=1 -DBASIC  -DPCBSKY  -DREVB -DUSB_JOYSTICK -DSTAMP -DCPUARM -MD -MP -MF obj_ersky9x/it.o.d -fno-exceptions -I . -I./sky/joy/inc it.cpp -o obj_ersky9x/it.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -Os -gdwarf-2 -mthumb -fomit-frame-pointer -Wall -fverbose-asm  -Dat91sam3s8 -DRUN_FROM_FLASH=1 -DBASIC  -DPCBSKY  -DREVB -DUSB_JOYSTICK -DSTAMP -DCPUARM -MD -MP -MF obj_ersky9x/pl.o.d -fno-exceptions -I . -I./sky/joy/inc pl.cpp -o obj_ersky9x/pl.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -Os -gdwarf-2 -mthumb -fomit-frame-pointer -Wall -fverbose-asm  -Dat91sam3s8 -DRUN_FROM_FLASH=1 -DBASIC  -DPCBSKY  -DREVB -DUSB_JOYSTICK -DSTAMP -DCPUARM -MD -MP -MF obj_ersky9x/vi.o.d -fno-exceptions -I . -I./sky/joy/inc vi.cpp -o obj_ersky9x/vi.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -Os -gdwarf-2 -mthumb -fomit-frame-pointer -Wall -fverbose-asm  -Dat91sam3s8 -DRUN_FROM_FLASH=1 -DBASIC  -DPCBSKY  -DREVB -DUSB_JOYSTICK -DSTAMP -DCPUARM -MD -MP -MF obj_ersky9x/sp.o.d -fno-exceptions -I . -I./sky/joy/inc sp.cpp -o obj_ersky9x/sp.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -Os -gdwarf-2 -mthumb -fomit-frame-pointer -Wall -fverbose-asm  -Dat91sam3s8 -DRUN_FROM_FLASH=1 -DBASIC  -DPCBSKY  -DREVB -DUSB_JOYSTICK -DSTAMP -DCPUARM -MD -MP -MF obj_ersky9x/pdi.o.d -fno-exceptions -I . -I./sky/joy/inc pdi.cpp -o obj_ersky9x/pdi.o
arm-none-eabi-gcc  obj_ersky9x/core_cm3.o obj_ersky9x/board_lowlevel.o obj_ersky9x/crt.o obj_ersky9x/vectors_sam3s.o obj_ersky9x/port.o obj_ersky9x/coos.o obj_ersky9x/HIDDJoystickDriver.o obj_ersky9x/HIDDFunction.o obj_ersky9x/USBDDriver.o obj_ersky9x/USBD.o obj_ersky9x/USBRequests.o obj_ersky9x/USBDescriptors.o obj_ersky9x/USBDDriverCallbacks.o obj_ersky9x/USBDCallbacks.o obj_ersky9x/HIDIdleRequest.o obj_ersky9x/HIDReportRequest.o obj_ersky9x/HIDDTransferDriver.o obj_ersky9x/USBD_HAL.o obj_ersky9x/pmc.o obj_ersky9x/device_descriptor.o obj_ersky9x/stamp.o obj_ersky9x/drivers.o obj_ersky9x/sdcard_driver.o obj_ersky9x/ff.o obj_ersky9x/sound.o obj_ersky9x/diskio.o obj_ersky9x/power.o obj_ersky9x/serial.o obj_ersky9x/lcd.o obj_ersky9x/file.o obj_ersky9x/templates.o obj_ersky9x/pers.o obj_ersky9x/menus.o obj_ersky9x/mixer.o obj_ersky9x/frsky.o obj_ersky9x/audio.o obj_ersky9x/ersky9x.o obj_ersky9x/timers.o obj_ersky9x/logicio.o obj_ersky9x/pulses.o obj_ersky9x/bluetooth.o obj_ersky9x/pulses_driver.o obj_ersky9x/en.o obj_ersky9x/de.o obj_ersky9x/fr.o obj_ersky9x/loadboot.o obj_ersky9x/maintenance.o obj_ersky9x/mavlink.o obj_ersky9x/sbus.o obj_ersky9x/pxx2.o obj_ersky9x/logs.o obj_ersky9x/parser.o obj_ersky9x/no.o obj_ersky9x/se.o obj_ersky9x/it.o obj_ersky9x/pl.o obj_ersky9x/vi.o obj_ersky9x/sp.o obj_ersky9x/pdi.o -mcpu=cortex-m3 -mthumb -nostartfiles -Tsam3s8c_flash.ld -Wl,-Map=ersky9x_rom.map,--cref,--no-warn-mismatch    -o ersky9x_rom.elf
arm-none-eabi-objcopy -O binary  ersky9x_rom.elf ersky9x_rom.bin
arm-none-eabi-objdump -h -S ersky9x_rom.elf > ersky9x_rom.lss
   text    data     bss     dec     hex filename
 298684     208   58636  357528   57498 ersky9x_rom.elf
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: CRSF protocol for TBS Crossfire?

Post by MikeB »

in the "makefile" find the following:

Code: Select all

 else
  PROJECT = ersky9x
  LDSCRIPT = sam3s8c_flash.ld
  EXT_MOD=REVB
  UDEFS = -Dat91sam3s8
 endif
and add a line defining XFIRE to give:

Code: Select all

 else
  PROJECT = ersky9x
  CPPDEFS += -DXFIRE
  LDSCRIPT = sam3s8c_flash.ld
  EXT_MOD=REVB
  UDEFS = -Dat91sam3s8
 endif
then do a "make clean", then make the firmware again.

The warnings are likely due to you using a newer version of the compiler. I'm using 7.2.1. I have tried more recent versions, but they created a larger firmware file that was too large for the original SKY board (only 256K flash).

I can only guess that adding the CRSF hardware buffer has changed the SPort interface so it doesn't flash devices anymore. The QX7 has a dedicated interface for doing that. Is there a schematic available for the hardware buffer?

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

grifild
Posts: 22
Joined: Tue May 25, 2021 12:35 pm
Country: -

Re: CRSF protocol for TBS Crossfire?

Post by grifild »

MikeB wrote: Thu Jul 08, 2021 11:39 am in the "makefile" find the following:

Code: Select all

 else
  PROJECT = ersky9x
  LDSCRIPT = sam3s8c_flash.ld
  EXT_MOD=REVB
  UDEFS = -Dat91sam3s8
 endif
and add a line defining XFIRE to give:

Code: Select all

 else
  PROJECT = ersky9x
  CPPDEFS += -DXFIRE
  LDSCRIPT = sam3s8c_flash.ld
  EXT_MOD=REVB
  UDEFS = -Dat91sam3s8
 endif
then do a "make clean", then make the firmware again.

The warnings are likely due to you using a newer version of the compiler. I'm using 7.2.1. I have tried more recent versions, but they created a larger firmware file that was too large for the original SKY board (only 256K flash).

I can only guess that adding the CRSF hardware buffer has changed the SPort interface so it doesn't flash devices anymore. The QX7 has a dedicated interface for doing that. Is there a schematic available for the hardware buffer?

Mike
Thank you! Now TX doesn't reboot when I selecting CRSF protocol. But still have no luck, to work properly with receiver. I got green led at Nano RX and Micro TX module, but no channels moving at the Betaflight Configurator. Also when I try to configure TX with the script "ersky9x-crossfire-script" it's closed with "error 3 in line 7". I think that I need different inverter because this one used only for working telemetry, as I read here: https://blog.seidel-philipp.de/fixed-in ... frsky-qx7/ from 3d render I found that at this board there are only one 100nF capacitor and SN74LVC1G04 Inverter
Or maybe I just need to sold Crossfire and find R9M module which must work great at AR9X Board :)
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: CRSF protocol for TBS Crossfire?

Post by MikeB »

I've just tried this on an AR9X board myself (upgraded to have a '4S8 CPU). I don't have any CRSF hardware so I just looked at the signal using a 'scope. It is at the wrong baudrate (100K instead of 400K). I'll need to investigate why, it is at 400K on a 9XR-PRO (basically the same hardware with a "real" SPort interface).

Also, having selected XFIRE protocol, then a different protocol, then back to XFIRE, it appears to stop sending anything. There is probably a bit of code used by XFIRE (CRSF) that is only included for the 'PRO (#ifdef REVX).

I'll try to look over the weekend.

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
grifild
Posts: 22
Joined: Tue May 25, 2021 12:35 pm
Country: -

Re: CRSF protocol for TBS Crossfire?

Post by grifild »

Thank you, Mike! If you need any tests with crossfire hardware, let me know and I'll do it.
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: CRSF protocol for TBS Crossfire?

Post by MikeB »

In Frsky.cpp, function "decodeTelemetryType( uint8_t telemetryType )", find this bit of code:

Code: Select all

		case TELEMETRY_HITEC :
			type = TEL_HITEC ;
		break ;
	}
#ifdef XFIRE
 #ifdef REVX
	if ( g_model.Module[1].protocol == PROTO_XFIRE )
	{
		type = TEL_XFIRE ;
	}
 #endif
 #ifdef PCB9XT
and change the REVX to PCBSKY:

Code: Select all

		case TELEMETRY_HITEC :
			type = TEL_HITEC ;
		break ;
	}
#ifdef XFIRE
 #ifdef PCBSKY
	if ( g_model.Module[1].protocol == PROTO_XFIRE )
	{
		type = TEL_XFIRE ;
	}
 #endif
 #ifdef PCB9XT
This looks to sort the baudrate and the reselection.

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
grifild
Posts: 22
Joined: Tue May 25, 2021 12:35 pm
Country: -

Re: CRSF protocol for TBS Crossfire?

Post by grifild »

WOW! It works, thank you! :o
It was not even necessary to solder the inverter, it works just with diode. Сontrol and telemetry :D
But I still get an error when running this script from nrw505
nrw505 wrote: Fri Oct 19, 2018 12:43 pm And now there's a mostly-working crossfire script at https://github.com/nrw505/ersky9x-crossfire-script

Note - only does enough to change power settings and enter binding mode on the Micro TX module so far
The first part of the script starts, but when I want to enter the second menu I get "error 111 at line 468" in the code from nvr05 this is calculateMenuItems function:

Code: Select all

464 calculateMenuItems:
465     i = 0
466     m = 0
467     while i < deviceParameterCounts[deviceIndex]
468         if parameterFetched[i] = 1 & parameterParent[i] = currentFolder & parameterHidden[i] = 0
469             menuItems[m] = i
470             m += 1
471         end
472         i += 1
473     end
474     menuItemCount = m
475     while m < kMaxMenuItems
476         menuItems[m] = -1
477         m += 1
478     end
479     return
since this script was written a long time ago, perhaps there have been some changes in the scripting language since then that are not compatible with the script? Or it's because slow update rate of AR9X board?
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: CRSF protocol for TBS Crossfire?

Post by MikeB »

Error 111 is "DIMENSION", which means "i" is larger than the dimension of the arrays (that are 16, so i > 15).

You could try adding the following after line 466:
limit = deviceParameterCounts[deviceIndex]
if limit > 15 then limit = 15
while i < limit

This would, at least, catch the error and let the script run.

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
grifild
Posts: 22
Joined: Tue May 25, 2021 12:35 pm
Country: -

Re: CRSF protocol for TBS Crossfire?

Post by grifild »

Thank you, your code catches this error, but now it crash with another "error 111 at line 322"

Code: Select all

319 parameterValue[index] = receiveBuffer[i + j + 8]
320         parameterMinValue[index] = receiveBuffer[i + j + 9]
321         parameterMaxValue[index] = receiveBuffer[i + j + 10]
322         parameterDefaultValue[index] = receiveBuffer[i + j + 11]
so this time problem with size of receiveBuffer array. As you write previously at this topic:
MikeB wrote: Sun Apr 08, 2018 2:54 pm I've just posted a new test version ('Pro and 9Xtreme). This allows a send of up to 64 bytes for crossfire. Receive should still work with 64 bytes
Are this changes already in current version for AR9X board?
I found your description of Basic script language and will try to deal with nrw505 script. If not I'll be changing parameters through TBS Agent M (Android App that connects to CrossfireTX Wifi)
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: CRSF protocol for TBS Crossfire?

Post by MikeB »

Those changes should be in all radios.

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
vlo
Posts: 2
Joined: Tue Jul 12, 2022 8:04 pm
Country: -

Re: CRSF protocol for TBS Crossfire?

Post by vlo »

Bringing some life to this thread again. Is anyone aware if the plain Turnigy 9XR without the PRO label, and without the m128 chip would be capable of supporting ELRS? If the answer is yes, would that require some hardware hacks?
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: CRSF protocol for TBS Crossfire?

Post by MikeB »

The Atmel processor (M64 or M128) is not able to handle the high speed serial (SPort) connection, even if the hardware is modified to support the bi-directional SPort connection.

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
vlo
Posts: 2
Joined: Tue Jul 12, 2022 8:04 pm
Country: -

Re: CRSF protocol for TBS Crossfire?

Post by vlo »

Unfortunate to hear, but thanks for the confirmation Mike.

Post Reply

Return to “ersky9xr”