Skip to content

Commit

Permalink
Mod config allocated for every model.
Browse files Browse the repository at this point in the history
Model number reduced to 16.
  • Loading branch information
qba667 committed Nov 23, 2017
1 parent 236f8c5 commit aef6e27
Show file tree
Hide file tree
Showing 7 changed files with 148 additions and 121 deletions.
51 changes: 39 additions & 12 deletions source/MKL16Z64xxx4_flash.ld
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,13 @@ SECTIONS
*(.screenBuffer);
} > m_data

.MOD_CONFIG2 0x20000D7A :
.MOD_CONFIG2 0x20000BC4 :
{
*(.mod_modConfigAsModel20);
*(.mod_modConfigAsModel17);
} > m_data

/* 20000E0C */

.AUX_MEM 0x20000F4A :
{
*(.mod_mainScreenIndex)
Expand All @@ -127,7 +129,7 @@ SECTIONS
*(.mod_altinitPressureRaw);
*(.mod_auxMem*)
KEEP(*(.AUX_MEM))
} > m_data
} > data


.mod_FLASH_25C8 0x25C8 :
Expand All @@ -143,7 +145,9 @@ SECTIONS
*(.mod_armed);
*(.mod_formatNumberFractial);
*(.mod_formatNumber);
*(.mod_formatGPS);
*(.mod_formatGPS);
*(.mod_timerMaxValues);
*(.mod_timerLabels);
*(.mod_FLASH_25C8*);
}
.mod_SIGNATURE_2780 0x2780 :
Expand Down Expand Up @@ -175,6 +179,7 @@ SECTIONS

.mod_TIMER_EXTENSION 0x5174 : {
*(.mod_TIMER_EXTENSION);
*(.mod_checkTimerActive*);
}

.mod_sensorConst 0x5260 : /*5260 - 0x52F0 */
Expand All @@ -197,6 +202,11 @@ SECTIONS
.reserved_afterSwB_adac 0x5354 :{
*(.reserved_afterSwB_adac);
}

.mod_TX_VOLTAGE_ADDRES 0x6344 : {
*(.mod_TX_VOLTAGE_ADDRES);
}

/* changed in assembly - call to 0x65C8*/
.mod_FREE_FLASH_65A8_768 0x65A8 :
{
Expand Down Expand Up @@ -227,17 +237,33 @@ SECTIONS
KEEP(*(.reserved_after_free_space_in_display))
}

.mod_mainScreenIndexAddress 0xC9A0 : {
*(.mod_mainScreenIndexAddress);
}

.mod_timerValueAddress 0xC9A4 : {
*(.mod_timerValueAddress);
}

.mod_timerBufferAddress 0xC9A8 : {
*(.mod_timerBufferAddress);
}


.mod_MOD_EEPROM 0xC9B0 :
{
*(.mod_loadModEeprom);
*(.mod_loadModEeprom);
*(.mod_saveModEeprom);
*(.mod_modelConfig);
*(.mod_customAlarmsPlay);
}

.reserved_after_eeprom 0xCA50 :
{
*(.reserved_after_eeprom);
}


.mod_freeSpaceAFHDSLogo 0xD50C :
{
*(.mod_yenyaSpace*);
Expand All @@ -249,17 +275,18 @@ SECTIONS

. = ALIGN(4);

.mod_MOD_CHANNELS_11_14 0xE400 :
{
*(.mod_channels1114);
}

.mod_MOD_ALARMS 0xE140 :
{
*(.mod_customAlarmsCheck);
*(.mod_customAlarmsPlay);
*(.mod_timerConfig);
}
/*Free space until 0xE400*/

.mod_MOD_CHANNELS_11_14 0xE400 :
{
*(.mod_channels1114);
}
/* few bytes free */
.mod_MOD_SWB 0xE570 :
{
Expand Down Expand Up @@ -317,7 +344,6 @@ SECTIONS
.mod_TIMER_SPACE 0xF8E0 :
{
*(.mod_printTimer*);
*(.mod_checkTimerActive*);
}
.mod_formatSensorValue 0xFA00 :
{
Expand All @@ -329,11 +355,12 @@ SECTIONS
{
*(.mod_alarmConfig);
}

/*
.mod_TimerConfigPage 0xFDE8 :
{
*(.mod_timerConfig);
}
*/
. = ALIGN(1);
.mod_extraMenu 0xFF90 : /*FFA0 - FFFF*/
{
Expand Down
Binary file modified source/build/org.bin
Binary file not shown.
Loading

2 comments on commit aef6e27

@Yenya
Copy link
Collaborator

@Yenya Yenya commented on aef6e27 Nov 23, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello, the change at MK*_flash.ld line 130 substitutes back m_data for data, breaking the build for me as before:

arm-none-eabi-g++ -mcpu=cortex-m0plus -mthumb -Os -DNO_SWE -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" ./utilities/fsl_debug_console.o ./utilities/fsl_notifier.o ./utilities/fsl_sbrk.o ./utilities/fsl_shell.o ./startup/startup_MKL16Z4.o ./startup/system_MKL16Z4.o ./source/adc.o ./source/alt.o ./source/backlight.o ./source/console.o ./source/debug.o ./source/flysky.o ./source/font.o ./source/lcd.o ./source/main.o ./source/mod.o ./source/print.o ./source/screen.o ./source/uart.o ./drivers/fsl_adc16.o ./drivers/fsl_clock.o ./drivers/fsl_cmp.o ./drivers/fsl_common.o ./drivers/fsl_cop.o ./drivers/fsl_dac.o ./drivers/fsl_dma.o ./drivers/fsl_dmamux.o ./drivers/fsl_flash.o ./drivers/fsl_gpio.o ./drivers/fsl_i2c.o ./drivers/fsl_i2c_dma.o ./drivers/fsl_llwu.o ./drivers/fsl_lpsci.o ./drivers/fsl_lpsci_dma.o ./drivers/fsl_lptmr.o ./drivers/fsl_pit.o ./drivers/fsl_pmc.o ./drivers/fsl_rcm.o ./drivers/fsl_rtc.o ./drivers/fsl_sai.o ./drivers/fsl_sai_dma.o ./drivers/fsl_sim.o ./drivers/fsl_smc.o ./drivers/fsl_spi.o ./drivers/fsl_spi_dma.o ./drivers/fsl_tpm.o ./drivers/fsl_tsi_v4.o ./drivers/fsl_uart.o ./drivers/fsl_uart_dma.o ./board/board.o ./board/clock_config.o ./board/pin_mux.o
/usr/lib/gcc/arm-none-eabi/7.1.0/../../../../arm-none-eabi/bin/ld:../MKL16Z64xxx4_flash.ld:134: warning: memory region `data' not declared
/usr/lib/gcc/arm-none-eabi/7.1.0/../../../../arm-none-eabi/bin/ld: section .mod_MOD_SWB LMA [000000000000e570,000000000000e643] overlaps section .mod_MOD_CHANNELS_11_14 LMA [000000000000e400,000000000000e573]
/usr/lib/gcc/arm-none-eabi/7.1.0/../../../../arm-none-eabi/bin/ld: section .AUX_MEM VMA [0000000020000f4a,0000000020000f9f] overlaps section .bss VMA [0000000020000eb0,00000000200010ab]
collect2: error: ld returned 1 exit status
makefile:76: recipe for target 'fs-i6-noswe.elf' failed
make: *** [fs-i6-noswe.elf] Error 1

@Yenya
Copy link
Collaborator

@Yenya Yenya commented on aef6e27 Nov 23, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anyway, I have added a fix to the "vario" branch for which I sent you a merge request before. So you can simply accept the merge request, if you find it OK.

Please sign in to comment.