From b398f319c74d12f2d1641c1fc16dbd5e14bff0b4 Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Mon, 26 Mar 2018 22:50:56 -0400 Subject: [PATCH] fixed linker script --- include/keypad.h | 1 + libinterp.a | Bin 71812 -> 47938 bytes link.ld | 33 ++++++++++++++++++++++++--------- src/keypad.c | 45 ++++++++++++++++++++++++--------------------- src/main.c | 2 +- 5 files changed, 50 insertions(+), 31 deletions(-) diff --git a/include/keypad.h b/include/keypad.h index 3dbebdf..5263a0d 100644 --- a/include/keypad.h +++ b/include/keypad.h @@ -28,6 +28,7 @@ * Starts a task to poll the buttons. Must be called before any keypad reading. */ void keypad_init(void); +void keypad_start(void); /** * Reads the last pressed key on the keypad. diff --git a/libinterp.a b/libinterp.a index c135dfcada4726243988951d049d3826890b2386..f00993242e5414ac266362cd0e4f61c02760a9bc 100644 GIT binary patch delta 6510 zcmcIod3Y36wy%4;I^BJ{lXOVPLMoLG=`3^-vXF!jvH<}D2FO4h0|c{R*o6qlk_>4A zVc)$VgCl~2Vh{l_j>l7CZH}?QU1UGd0lSDbas&CD)moHnLcOAjM=?srW=#a%*o0!7AM!`%FM{1mANl- zv$J94=4Q+5A0@HcjvTe0$!k{?#WB*XDDTo*;qM0bT{#PgWr|{=^;39EUr1)%Wugl= zA2TkNR)TWXJO!{1N$>%W0H#{%F<>=^z-P5AA*V{P8FMg}Kx3vCsh}w`m4sqCA-}aG zv3WAm>PhZKiB(rC1u*JM^dPM2-hz0=)Q@7+go9+*_sOZ&xKSKQ9BbfKEH1O_B`POw zQ;0bZsv_Dchq>n~q^lw@fb{rNq+7*KVBBj6;t<=QC;SijonnW)WQ_W?5b6vBj6j6zPUW#?RSh$G1Q z0%|G3MayA%DVE%{WS;=F=OF}rMZH<}-yj*LnjRpKEgYNG{Ri?y+S0y4oIdB_ zdeBbT@}WCKAqCm`LwAaADUYoHdYIUPiiOZ4#XG@itGXkY`gjk8gQzDZX@Rm4iPJRa#)aSr)v zg2`hQLu9SJ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TK;ZqvEpyBHps-qR~eW+>WUI_Xti$-O^a4O>eq!9AR zg0M`(N)7o38I0#Yfe?0R$g^kC*K7EchA(LNx`xLzOk(|jKTAP0)=@fw>suzw*6;!i zIoD(SDh2Xm3X5|5$4o;02`S;9HT+ydJ7)Nd=ReNIh=g>+a1AGEI7>t2p9sFc zYWfQe6R`B4e7c5V4JT=MwuTEeY|wCdaFm8qG~@+HrZ3X4nYXkU!E0262Q~b$hF@vu#>9*1O&YdoxKYEa z3DKhO(e&dQ{y@V&Xn2AUd|zuiiSD6PJYB zEtnZb!Z$H=`l`NXh1cN89X+rVZWdLFf%@z4{|{SQ6)N26^h zQv8Qfs9!lk)VZiu6mo-ZerG(m1K=e1jEA1JuxvW2A^wZ&fhLHXpy|wxk&E)J zF^gHDIrV1MJWz#r3=EI=(-}t_z}MgODD+Ve_2KRI>bo2`WcnNF%tH)REQUgn UrW_*=W0d<=-x(;hsx#342i#HCJ^%m! diff --git a/link.ld b/link.ld index be1c523..b7adb78 100644 --- a/link.ld +++ b/link.ld @@ -35,31 +35,45 @@ SECTIONS { . = ALIGN(8); } > FLASH - /* code sections */ + /* other code sections */ .text : { . = ALIGN(8); *(.text) + *(.text*) + + *(.init) + *(.fini) . = ALIGN(8); } > FLASH - /* readonly data */ + /* read-only data sections */ .rodata : { . = ALIGN(8); *(.rodata) + *(.rodata*) + + *(.eh_frame) . = ALIGN(8); } > FLASH + /* ARM stuff */ + .ARM.exidx : { + *(.ARM.exidx) + } > FLASH + /* init_array/fini_array (TODO understand this) */ .init_array : { - PROVIDE_HIDDEN(__init_array_start = .); - KEEP(*(.init_array)) - PROVIDE_HIDDEN(__init_array_end = .); + __init_array_start = .; + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array*)) + __init_array_end = .; } > FLASH .fini_array : { - PROVIDE_HIDDEN(__fini_array_start = .); - KEEP(*(.fini_array)) - PROVIDE_HIDDEN(__fini_array_end = .); + __fini_array_start = .; + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array*)) + __fini_array_end = .; } > FLASH /* initialized data */ @@ -74,9 +88,10 @@ SECTIONS { /* uninitialized data */ .bss : { - . = ALIGN(8); + . = ALIGN(4); __bss_start__ = .; *(.bss) + . = ALIGN(4); __bss_end__ = .; } > RAM } diff --git a/src/keypad.c b/src/keypad.c index 06cef51..20a67c2 100644 --- a/src/keypad.c +++ b/src/keypad.c @@ -49,12 +49,12 @@ static const port_t keypad_cols[COLS] = { { COL_0 }, { COL_1 }, { COL_2 }, { COL_3 }, { COL_4 } }; -static const int keypad_map[ROWS][COLS] = { - { '7', '8', '9', 'x', '/' }, - { '4', '5', '6', 'y', '*' }, - { '3', '2', '1', 'z', '-' }, - { '.', '0', '\b', '\n', '+' } -}; +//static const int keypad_map[ROWS][COLS] = { +// { '7', '8', '9', 'x', '/' }, +// { '4', '5', '6', 'y', '*' }, +// { '3', '2', '1', 'z', '-' }, +// { '.', '0', '\b', '\n', '+' } +//}; #define BUFFER_SIZE 8 static char keypad_buffer = 'A';//[BUFFER_SIZE]; @@ -62,22 +62,22 @@ static char keypad_buffer = 'A';//[BUFFER_SIZE]; void keypad_task(void) { - unsigned int col = 0; + //unsigned int col = 0; while (1) { - gpio_dout(keypad_cols[col].port, keypad_cols[col].pin, 1); - for (unsigned int row = 0; row < ROWS; row++) { - if (gpio_din(keypad_rows[row].port, keypad_rows[row].pin)) { - //if (keypad_buffer_pos < BUFFER_SIZE) - keypad_buffer/*[++keypad_buffer_pos]*/ = keypad_map[row][col]; - while (gpio_din(keypad_rows[row].port, keypad_rows[row].pin)) - delay(1); - break; - } - } - gpio_dout(keypad_cols[col].port, keypad_cols[col].pin, 0); - col++; - if (col == COLS) - col = 0; + // gpio_dout(keypad_cols[col].port, keypad_cols[col].pin, 1); + // for (unsigned int row = 0; row < ROWS; row++) { + // if (gpio_din(keypad_rows[row].port, keypad_rows[row].pin)) { + // //if (keypad_buffer_pos < BUFFER_SIZE) + // keypad_buffer/*[++keypad_buffer_pos]*/ = keypad_map[row][col]; + // while (gpio_din(keypad_rows[row].port, keypad_rows[row].pin)) + // delay(1); + // break; + // } + // } + // gpio_dout(keypad_cols[col].port, keypad_cols[col].pin, 0); + // col++; + // if (col == COLS) + // col = 0; delay(10); } @@ -102,7 +102,10 @@ void keypad_init(void) gpio_speed(p, pin, VERYHIGH); gpio_dout(p, pin, 0); } +} +void keypad_start(void) +{ task_start(keypad_task, 1024); } diff --git a/src/main.c b/src/main.c index 1e9b58d..65fa1d3 100644 --- a/src/main.c +++ b/src/main.c @@ -74,7 +74,7 @@ void kmain(void) dsp_init(); dsp_rect(0, 0, LCD_WIDTH, LCD_HEIGHT, dsp_color(0, 0, 0)); dsp_cursoron(); - keypad_init(); + keypad_start(); task_start(task_interpreter, 4096); /*char buf[2];