Skip to content

Commit

Permalink
Turnigy TGY-CAT01 implemented.
Browse files Browse the repository at this point in the history
  • Loading branch information
qba667 committed Dec 11, 2017
1 parent 6d123c6 commit 094ad2a
Show file tree
Hide file tree
Showing 7 changed files with 258 additions and 217 deletions.
23 changes: 12 additions & 11 deletions source/MKL16Z64xxx4_flash.ld
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,9 @@ SECTIONS
*(.mod_timerValue);
*(.mod_ticks100ms);
*(.mod_lastTimerUpdate);
*(.mod_altconstVal);
*(.mod_altinitPressure);
*(.mod_altinitPressureRaw);
*(.mod_auxMem*)
*(.mod_altSensorMemory);
*(.mod_varioMem);
*(.mod_altSensorMemory);
KEEP(*(.AUX_MEM))
} > m_data

Expand Down Expand Up @@ -172,12 +170,17 @@ SECTIONS
*(.mod_sensorsScreens);
*(.mod_timerFormat);
*(.mod_armed);
*(.mod_defASL);
}
.reserved_main 0x2800:
{
KEEP(*(.reserved_main))
}

.mod_beep_silent 0x9C3C : {
*(.mod_beep_silent);
}

/*calls from FW to C code*/
.mod_configurePins_ASM 0xC0D2 : {
*(.mod_configurePins_ASM);
Expand Down Expand Up @@ -257,7 +260,6 @@ SECTIONS
/*Free space for code 288 bytes*/
.mod_code_5174_5353 0x5174 : {
*(.mod_varioSensorSelect);
*(.mod_log2fix);
*(.mod_configurePins);
*(.mod_createPacketCh1114);
}
Expand All @@ -270,6 +272,7 @@ SECTIONS
*(.mod_parseAC);
*(.mod_acHelper);
*(.mod_displaySensors);
*(.mod_aslLabels);
}
.reserved_after_code_65C8_68A7 0x68A8 : {
*(.reserved_after_code_65C8_68A7);
Expand Down Expand Up @@ -353,16 +356,14 @@ SECTIONS
*(.mod_alarmConfig);
*(.mod_timerConfig);
*(.mod_modMenuListFun);
*(.mod_log2fix);
*(.mod_getALT);
*(.mod_asl);
}
. = ALIGN(1);
.mod_extraMenu 0xFFB0 : {
*(.mod_modMenuList);
*(.mod_txBat);
*(.mod_altText);
*(.mod_alarm);
.mod_extraMenu 0xFFA8 : {
*(.mod_extraMenu);
}

.reserved_checksum 0xFFFD :{
*(.reserved_checksum*);
}
Expand Down
34 changes: 17 additions & 17 deletions source/build/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,17 @@ fs-i6.bin \
SECONDARY_SIZE += \
fs-i6.siz \

SECONDARY_FLASH_NO_SWE += \
fs-i6-noswe.bin \
SECONDARY_FLASH_SWE += \
fs-i6-swe.bin \

SECONDARY_SIZE_NO_SWE += \
fs-i6-noswe.siz \
SECONDARY_SIZE_SWE += \
fs-i6-swe.siz \

PARAMS =

# All Target
all: fs-i6.elf secondary-outputs
all-noswe: fs-i6-noswe.elf secondary-outputs-noswe
all-swe: fs-i6-swe.elf secondary-outputs-swe
# Tool invocations

fs-i6.elf: $(OBJS) $(USER_OBJS)
Expand All @@ -71,11 +71,11 @@ fs-i6.elf: $(OBJS) $(USER_OBJS)
arm-none-eabi-g++ -mcpu=cortex-m0plus -mthumb -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall -g -T "../MKL16Z64xxx4_flash.ld" -Xlinker --gc-sections -Wl,-Map,"fs-i6.map" --specs=nano.specs -specs=nosys.specs -Xlinker -z -Xlinker muldefs -o "fs-i6.elf" $(OBJS) $(USER_OBJS) $(LIBS)
@echo 'Finished building target: $@'
@echo ' '
fs-i6-noswe.elf: PARAMS = -DNO_SWE
fs-i6-noswe.elf: $(OBJS) $(USER_OBJS)
fs-i6-swe.elf: PARAMS = -DSWE
fs-i6-swe.elf: $(OBJS) $(USER_OBJS)
@echo 'Building target: $@'
@echo 'Invoking: Cross ARM C++ Linker'
arm-none-eabi-g++ -mcpu=cortex-m0plus -mthumb -Os $(PARAMS) -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall -g -T "../MKL16Z64xxx4_flash.ld" -Xlinker --gc-sections -Wl,-Map,"fs-i6-noswe.map" --specs=nano.specs -specs=nosys.specs -Xlinker -z -Xlinker muldefs -o "fs-i6-noswe.elf" $(OBJS) $(USER_OBJS) $(LIBS)
arm-none-eabi-g++ -mcpu=cortex-m0plus -mthumb -Os $(PARAMS) -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall -g -T "../MKL16Z64xxx4_flash.ld" -Xlinker --gc-sections -Wl,-Map,"fs-i6-swe.map" --specs=nano.specs -specs=nosys.specs -Xlinker -z -Xlinker muldefs -o "fs-i6-swe.elf" $(OBJS) $(USER_OBJS) $(LIBS)
@echo 'Finished building target: $@'
@echo ' '
fs-i6.bin: fs-i6.elf
Expand All @@ -86,12 +86,12 @@ fs-i6.bin: fs-i6.elf
python3 flysky3.py fs-i6.bin fs-i6
@echo 'Finished building: $@'
@echo ' '
fs-i6-noswe.bin: fs-i6-noswe.elf
fs-i6-swe.bin: fs-i6-swe.elf
@echo 'Invoking: Cross ARM GNU Create Flash Image'
arm-none-eabi-objcopy --update-section .interrupts=org.bin "fs-i6-noswe.elf"
arm-none-eabi-objcopy -j .interrupts -j .mod_* -O binary "fs-i6-noswe.elf" "fs-i6-noswe.bin"
arm-none-eabi-objcopy --update-section .interrupts=org.bin "fs-i6-swe.elf"
arm-none-eabi-objcopy -j .interrupts -j .mod_* -O binary "fs-i6-swe.elf" "fs-i6-swe.bin"
#python flysky2.py fs-i6.bin fs-i6
python3 flysky3.py fs-i6-noswe.bin fs-i6-noswe
python3 flysky3.py fs-i6-swe.bin fs-i6-swe
@echo 'Finished building: $@'
@echo ' '

Expand All @@ -102,19 +102,19 @@ fs-i6.siz: fs-i6.elf
@echo 'Finished building: $@'
@echo ' '

fs-i6-noswe.siz: fs-i6-noswe.elf
fs-i6-swe.siz: fs-i6-swe.elf
@echo 'Invoking: Cross ARM GNU Print Size'
arm-none-eabi-size --format=berkeley "fs-i6-noswe.elf"
arm-none-eabi-size --format=sysv "fs-i6-noswe.elf" -x
arm-none-eabi-size --format=berkeley "fs-i6-swe.elf"
arm-none-eabi-size --format=sysv "fs-i6-swe.elf" -x
@echo 'Finished building: $@'
@echo ' '
# Other Targets
clean:
-$(RM) $(SECONDARY_SIZE)$(C++_DEPS)$(OBJS)$(C_DEPS)$(ASM_DEPS)$(CC_DEPS)$(SECONDARY_FLASH)$(CPP_DEPS)$(CXX_DEPS)$(C_UPPER_DEPS)$(S_UPPER_DEPS)$(SECONDARY_SIZE_NO_SWE)$(SECONDARY_SIZE_NO_SWE) fs-i6.elf fs-i6-noswe.elf
-$(RM) $(SECONDARY_SIZE)$(C++_DEPS)$(OBJS)$(C_DEPS)$(ASM_DEPS)$(CC_DEPS)$(SECONDARY_FLASH)$(CPP_DEPS)$(CXX_DEPS)$(C_UPPER_DEPS)$(S_UPPER_DEPS)$(SECONDARY_SIZE_SWE)$(SECONDARY_SIZE_SWE) fs-i6.elf fs-i6-swe.elf
-@echo ' '

secondary-outputs: $(SECONDARY_FLASH) $(SECONDARY_SIZE)
secondary-outputs-noswe: $(SECONDARY_FLASH_NO_SWE) $(SECONDARY_SIZE_NO_SWE)
secondary-outputs-swe: $(SECONDARY_FLASH_SWE) $(SECONDARY_SIZE_SWE)
.PHONY: all clean dependents
.SECONDARY:

Expand Down
Loading

0 comments on commit 094ad2a

Please sign in to comment.