# HG changeset patch # User Michael Spacefalcon # Date 1409776194 0 # Node ID 1199cdf99c3263ead48e74d3a806b13f1ee766f1 # Parent d779078abe40ca830e7dc1e37f699710e48ab0ea SIM integration: sim32.c compiles diff -r d779078abe40 -r 1199cdf99c32 gsm-fw/bsp/Makefile --- a/gsm-fw/bsp/Makefile Wed Sep 03 17:50:06 2014 +0000 +++ b/gsm-fw/bsp/Makefile Wed Sep 03 20:29:54 2014 +0000 @@ -3,9 +3,15 @@ ASFLAGS=-mthumb-interwork LD= arm-elf-ld +sinclude ../include/config.mk + IOBJS= irq_twiddle.o niq32.o +XTOBJS= armio.o clkm.o init_target.o inth.o niq.o timer.o timer1.o timer2.o -XTOBJS= armio.o clkm.o init_target.o inth.o niq.o timer.o timer1.o timer2.o +ifeq (${CONFIG_INCLUDE_SIM},1) +XTOBJS+=sim.o +IOBJS+= sim32.o +endif XOBJS= ${XTOBJS} oldint.o AOBJS= ${IOBJS} oldint.o diff -r d779078abe40 -r 1199cdf99c32 gsm-fw/bsp/sim32.c --- a/gsm-fw/bsp/sim32.c Wed Sep 03 17:50:06 2014 +0000 +++ b/gsm-fw/bsp/sim32.c Wed Sep 03 20:29:54 2014 +0000 @@ -11,11 +11,10 @@ #define SIM32_C 1 -#include "chipset.cfg" +#include "../include/config.h" +#include "../include/sys_types.h" -#include "main/sys_types.h" -#include -#include "inth/iq.h" +#include "iq.h" #include "sim.h" @@ -62,8 +61,8 @@ #ifdef SIM_DEBUG_TRACE if ((IQ_FrameCount - SIM_dbg_local_count) > SIM_dbg_tdma_diff) { - SIM_dbg_tdma_diff = IQ_FrameCount - SIM_dbg_local_count; - } + SIM_dbg_tdma_diff = IQ_FrameCount - SIM_dbg_local_count; + } SIM_dbg_local_count = IQ_FrameCount; #endif @@ -163,13 +162,13 @@ } else { - if (p->rx_index == p->expected_data) - { - p->moderx = 5; - } + if (p->rx_index == p->expected_data) + { + p->moderx = 5; + } } break; - + case 5: //mode wait for procedure character except NULL if ((rx != 0x60) || (p->SWcount != 0)) //treat NULL character only if arriving before SW1 SW2 { @@ -182,10 +181,8 @@ SIM_dbg_null[2]++; #endif } - + break; - break; - case 6: //give the acknowledge char if (((rx & 0xF0) == 0x60) || ((rx & 0xF0) == 0x90)) {