aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--.gitignore5
-rw-r--r--AT91SAM7S256/SAM7S256/Include/Cstartup.S442
-rw-r--r--AT91SAM7S256/SAM7S256/Include/Cstartup_SAM7.c7
-rw-r--r--AT91SAM7S256/SAM7S256/Include/sam7s256.h4
-rw-r--r--AT91SAM7S256/SAM7S256/gcc/.gitignore3
-rw-r--r--AT91SAM7S256/SAM7S256/gcc/Makefile96
-rw-r--r--AT91SAM7S256/SAM7S256/gcc/lib/errno.c32
-rw-r--r--AT91SAM7S256/SAM7S256/gcc/lib/sbrk.c44
-rw-r--r--AT91SAM7S256/SAM7S256/gcc/lib/sscanf.c49
-rw-r--r--AT91SAM7S256/SAM7S256/gcc/lib/strtod.c257
-rw-r--r--AT91SAM7S256/SAM7S256/gcc/nxt.ld136
-rw-r--r--AT91SAM7S256/Source/BtTest.inc16
-rw-r--r--AT91SAM7S256/Source/Connections.txt4
-rw-r--r--AT91SAM7S256/Source/Cursor.txt5
-rw-r--r--AT91SAM7S256/Source/Devices.txt4
-rw-r--r--AT91SAM7S256/Source/Display.txt4
-rw-r--r--AT91SAM7S256/Source/Fail.txt4
-rw-r--r--AT91SAM7S256/Source/Font.txt4
-rw-r--r--AT91SAM7S256/Source/Functions.inl38
-rw-r--r--AT91SAM7S256/Source/Icons.txt4
-rw-r--r--AT91SAM7S256/Source/Info.txt4
-rw-r--r--AT91SAM7S256/Source/LowBattery.txt4
-rw-r--r--AT91SAM7S256/Source/Ok.txt4
-rw-r--r--AT91SAM7S256/Source/Port.txt4
-rw-r--r--AT91SAM7S256/Source/RCXintro_1.txt4
-rw-r--r--AT91SAM7S256/Source/RCXintro_10.txt4
-rw-r--r--AT91SAM7S256/Source/RCXintro_11.txt4
-rw-r--r--AT91SAM7S256/Source/RCXintro_12.txt4
-rw-r--r--AT91SAM7S256/Source/RCXintro_13.txt4
-rw-r--r--AT91SAM7S256/Source/RCXintro_14.txt4
-rw-r--r--AT91SAM7S256/Source/RCXintro_15.txt4
-rw-r--r--AT91SAM7S256/Source/RCXintro_16.txt4
-rw-r--r--AT91SAM7S256/Source/RCXintro_2.txt4
-rw-r--r--AT91SAM7S256/Source/RCXintro_3.txt4
-rw-r--r--AT91SAM7S256/Source/RCXintro_4.txt4
-rw-r--r--AT91SAM7S256/Source/RCXintro_5.txt4
-rw-r--r--AT91SAM7S256/Source/RCXintro_6.txt4
-rw-r--r--AT91SAM7S256/Source/RCXintro_7.txt4
-rw-r--r--AT91SAM7S256/Source/RCXintro_8.txt4
-rw-r--r--AT91SAM7S256/Source/RCXintro_9.txt4
-rw-r--r--AT91SAM7S256/Source/Running.txt4
-rw-r--r--AT91SAM7S256/Source/Status.txt4
-rw-r--r--AT91SAM7S256/Source/Step.txt4
-rw-r--r--AT91SAM7S256/Source/Test1.txt4
-rw-r--r--AT91SAM7S256/Source/Test2.txt4
-rw-r--r--AT91SAM7S256/Source/Ui.txt4
-rw-r--r--AT91SAM7S256/Source/Wait.txt4
-rw-r--r--AT91SAM7S256/Source/c_cmd.c25
-rw-r--r--AT91SAM7S256/Source/c_cmd.h4
-rw-r--r--AT91SAM7S256/Source/c_input.c87
-rw-r--r--AT91SAM7S256/Source/c_output.c96
-rw-r--r--AT91SAM7S256/Source/c_ui.c41
-rw-r--r--AT91SAM7S256/Source/c_ui.h2
-rw-r--r--AT91SAM7S256/Source/config.h10
-rw-r--r--AT91SAM7S256/Source/d_loader.h9
-rw-r--r--AT91SAM7S256/Source/d_lowspeed.r138
-rw-r--r--AT91SAM7S256/Source/d_output.c45
-rw-r--r--AT91SAM7S256/Source/d_output.h7
-rw-r--r--AT91SAM7S256/Source/d_sound.r1
-rw-r--r--AT91SAM7S256/Source/d_sound_adpcm.r2
-rw-r--r--AT91SAM7S256/Source/m_sched.h4
-rw-r--r--AT91SAM7S256/Source/stdconst.h26
-rw-r--r--README29
63 files changed, 1436 insertions, 356 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..06741cc
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+*.[oad]
+*.lst
+*.sym
+*.elf
+tags
diff --git a/AT91SAM7S256/SAM7S256/Include/Cstartup.S b/AT91SAM7S256/SAM7S256/Include/Cstartup.S
new file mode 100644
index 0000000..b60ba2c
--- /dev/null
+++ b/AT91SAM7S256/SAM7S256/Include/Cstartup.S
@@ -0,0 +1,442 @@
+/*------------------------------------------------------------------------------
+//*- ATMEL Microcontroller Software Support - ROUSSET -
+//*------------------------------------------------------------------------------
+//* The software is delivered "AS IS" without warranty or condition of any
+//* kind, either express, implied or statutory. This includes without
+//* limitation any warranty or condition with respect to merchantability or
+//* fitness for any particular purpose, or against the infringements of
+//* intellectual property rights of others.
+//*-----------------------------------------------------------------------------
+//*- File source : Cstartup.s
+//*- Object : Generic CStartup for KEIL and GCC
+//*- Compilation flag : None
+//*-
+//*- 1.0 18/Oct/04 JPP : Creation
+//*- 1.1 21/Feb/05 JPP : Set Interrupt
+//*- 1.1 01/Apr/05 JPP : save SPSR
+//*
+//*- WinARM/arm-elf-gcc-version by Martin Thomas - Modifications:
+//* remapping-support, vector-location, stack-position and more...
+//*-----------------------------------------------------------------------------*/
+
+/*
+ 20060902 (mth) : moved IRQ-Handler from section .vect* to
+ .init/.fastrun
+ 20061101 (mth) : update IRQ-Handler
+ FIQ-stack init
+*/
+
+/* check configuration-options and map to "assembler symbols": */
+
+/*#include "AT91SAM7S256_inc.h"*/
+
+#ifdef ROM_RUN
+.set RAM_MODE, 0
+#ifdef VECTORS_IN_RAM
+.set REMAP, 1
+.set VECTREMAPPED, 1
+#else
+.set REMAP, 0
+.set VECTREMAPPED, 0
+#endif
+#endif
+
+#ifdef RAM_RUN
+.set RAM_MODE, 1
+.set REMAP, 1
+.set VECTREMAPPED, 0
+#endif
+
+.set VECTREMAPPED_AUTODETECT, 0
+.set CPP_CONSTRUCTORS, 0
+
+
+.if (RAM_MODE)
+.print "RAM_MODE enabled"
+.else
+.print "ROM_MODE enabled"
+.endif
+
+.if (REMAP)
+.print "remapping enabled"
+.endif
+
+.if (VECTREMAPPED)
+.print "Vectors at start of RAM"
+.else
+.print "Vectors at start of Code"
+.endif
+
+ .equ AIC_IVR, (256)
+ .equ AIC_FVR, (260)
+ .equ AIC_EOICR, (304)
+ .equ AT91C_BASE_AIC, (0xFFFFF000)
+
+/*------------------------------------------------------------------------------
+//*- Exception vectors
+//*--------------------
+//*- These vectors can be read at address 0 or at RAM address
+//*- They ABSOLUTELY requires to be in relative addresssing mode in order to
+//*- guarantee a valid jump. For the moment, all are just looping.
+//*- If an exception occurs before remap, this would result in an infinite loop.
+//*- To ensure if a exeption occurs before start application to infinite loop.
+//*------------------------------------------------------------------------------*/
+
+.if (VECTREMAPPED)
+.print "Vectors in section .vectmapped -> .data"
+.section .vectmapped, "ax"
+.else
+.print "Vectors in section .vectorg -> .text"
+.section .vectorg, "ax"
+.endif
+
+ LDR PC,Reset_Addr /* 0x00 Reset handler */
+ LDR PC,Undef_Addr /* 0x04 Undefined Instruction */
+ LDR PC,SWI_Addr /* 0x08 Software Interrupt */
+ LDR PC,PAbt_Addr /* 0x0C Prefetch Abort */
+ LDR PC,DAbt_Addr /* 0x10 Data Abort */
+ NOP /* 0x14 reserved */
+ LDR PC,IRQ_Addr /* 0x18 IRQ */
+fiqvec: /* 0x1c FIQ */
+/*------------------------------------------------------------------------------
+//*- Function : FIQ_Handler_Entry
+//*- Treatments : FIQ Controller Interrupt Handler.
+//*- Called Functions : AIC_FVR[interrupt]
+//*------------------------------------------------------------------------------*/
+
+FIQ_Handler_Entry:
+
+/*- Switch in SVC/User Mode to allow User Stack access for C code */
+/* because the FIQ is not yet acknowledged*/
+
+/*- Save and r0 in FIQ_Register */
+ mov r9,r0
+ ldr r0 , [r8, #AIC_FVR]
+ msr CPSR_c,#I_BIT | F_BIT | ARM_MODE_SVC
+
+/*- Save scratch/used registers and LR in User Stack */
+ stmfd sp!, { r1-r3, r12, lr}
+
+/*- Branch to the routine pointed by the AIC_FVR */
+ mov r14, pc
+ bx r0
+
+/*- Restore scratch/used registers and LR from User Stack */
+ ldmia sp!, { r1-r3, r12, lr}
+
+/*- Leave Interrupts disabled and switch back in FIQ mode */
+ msr CPSR_c, #I_BIT | F_BIT | ARM_MODE_FIQ
+
+/*- Restore the R0 ARM_MODE_SVC register */
+ mov r0,r9
+
+/*- Restore the Program Counter using the LR_fiq directly in the PC */
+ subs pc,lr,#4
+
+/* end of fiqhandler */
+
+Reset_Addr: .word InitReset
+Undef_Addr: .word Undef_Handler
+SWI_Addr: .word SWI_Handler
+/*SWI_Addr: .word SoftwareInterruptASM*/ /*in swi_handler.S */
+PAbt_Addr: .word PAbt_Handler
+DAbt_Addr: .word DAbt_Handler
+IRQ_Addr: .word IRQ_Handler_Entry
+
+Undef_Handler: B Undef_Handler
+SWI_Handler: B SWI_Handler
+PAbt_Handler: B PAbt_Handler
+DAbt_Handler: B DAbt_Handler
+
+
+ .arm
+ .section .init, "ax"
+ .global _startup
+ .func _startup
+_startup:
+reset:
+
+.if (VECTREMAPPED)
+/* mthomas: Dummy used during startup */
+ LDR PC, Reset_Addr_F
+ NOP
+ NOP
+ NOP
+ NOP
+ NOP /*.word 0xdeadbeef*/ /* Reserved Address */
+ NOP
+ NOP
+Reset_Addr_F: .word InitReset
+.endif
+
+.RAM_TOP:
+ .word __TOP_STACK
+
+InitReset:
+
+/*------------------------------------------------------------------------------
+/*- Remapping
+/*------------------------------------------------------------------------------*/
+.if (VECTREMAPPED)
+ .print "RCR setting for remapping enabled"
+ .equ MC_BASE,0xFFFFFF00 /* MC Base Address */
+ .equ MC_RCR, 0x00 /* MC_RCR Offset */
+
+
+.if (VECTREMAPPED_AUTODETECT)
+ /* store first word in RAM into r4 */
+ ldr r0,=__FIRST_IN_RAM
+ ldr r4,[r0]
+ /* load value at address 0 into R2 */
+ ldr r1,=0x00000000
+ ldr r2,[r1]
+ /* xor value from address 0 (flip all bits), store in R3 */
+ ldr r3,=0xffffffff
+ eor r3, r2, r3
+ /* write xored value to first word in RAM
+ if already remapped this will also change
+ the value at 0 */
+ str r3,[r0]
+ /* load from address 0 again into R3 */
+ ldr r3,[r1]
+ /* restore first value in RAM */
+ str r4,[r0]
+
+ /* compare */
+ cmp r3, r2
+ bne already_remapped
+.endif
+
+ /* if both values have been equal the change of the
+ RAM-value had no effect on the value at 0x00000000
+ so we are not remapping yet -> remap now: */
+ LDR R0, =MC_BASE
+ MOV R1, #1
+ STR R1, [R0, #MC_RCR]
+
+already_remapped:
+.endif
+
+
+/*------------------------------------------------------------------------------
+/*- Low level Init (PMC, AIC, ? ....) by C function AT91F_LowLevelInit
+/*------------------------------------------------------------------------------*/
+ .extern AT91F_LowLevelInit
+/*- minumum C initialization */
+/*- call AT91F_LowLevelInit( void) */
+
+ ldr sp, .RAM_TOP /* temporary stack in internal RAM (**) */
+/*--Call Low level init function in ABSOLUTE through the Interworking */
+ ldr r0,=AT91F_LowLevelInit
+ mov lr, pc
+ bx r0
+/*------------------------------------------------------------------------------
+//*- Stack Sizes Definition
+//*------------------------
+//*- Interrupt Stack requires 2 words x 8 priority level x 4 bytes when using
+//*- the vectoring. This assume that the IRQ management.
+//*- The Interrupt Stack must be adjusted depending on the interrupt handlers.
+//*- Fast Interrupt not requires stack If in your application it required you must
+//*- be definehere.
+//*- The System stack size is not defined and is limited by the free internal
+//*- SRAM.
+//*------------------------------------------------------------------------------*/
+
+/*------------------------------------------------------------------------------
+//*- Top of Stack Definition
+//*-------------------------
+//*- Interrupt and Supervisor Stack are located at the top of internal memory in
+//*- order to speed the exception handling context saving and restoring.
+//*- ARM_MODE_SVC (Application, C) Stack is located at the top of the external memory.
+//*------------------------------------------------------------------------------*/
+
+ .EQU IRQ_STACK_SIZE, (3*8*4)
+ .EQU FIQ_STACK_SIZE, (3*8*4)
+ .EQU ARM_MODE_FIQ, 0x11
+ .EQU ARM_MODE_IRQ, 0x12
+ .EQU ARM_MODE_SVC, 0x13
+
+ .EQU I_BIT, 0x80
+ .EQU F_BIT, 0x40
+
+/*------------------------------------------------------------------------------
+//*- Setup the stack for each mode
+//*-------------------------------*/
+ mov r0, sp /* see (**) */
+
+/*- Set up Fast Interrupt Mode and set FIQ Mode Stack*/
+ msr CPSR_c, #ARM_MODE_FIQ | I_BIT | F_BIT
+ mov sp, r0
+ sub r0, r0, #FIQ_STACK_SIZE
+/*- Init the FIQ register*/
+ ldr r8, =AT91C_BASE_AIC
+
+/*- Set up Interrupt Mode and set IRQ Mode Stack*/
+ msr CPSR_c, #ARM_MODE_IRQ | I_BIT | F_BIT
+ mov sp, r0 /* Init stack IRQ */
+ sub r0, r0, #IRQ_STACK_SIZE
+
+/*- Set up Supervisor Mode and set Supervisor Mode Stack*/
+// /* start with INT and FIQ enabled */
+ msr CPSR_c, #ARM_MODE_SVC
+
+ /* start with INT and FIQ disabled */
+// msr CPSR_c, #ARM_MODE_SVC | I_BIT | F_BIT
+
+ mov sp, r0 /* Init stack Sup */
+
+
+/*- Enable interrupt & Set up Supervisor Mode and set Supervisor Mode Stack*/
+
+/* Relocate .data section (Copy from ROM to RAM)
+ This will also copy the .vectmapped and .fastrun */
+ LDR R1, =_etext
+ LDR R2, =_data
+ LDR R3, =_edata
+LoopRel: CMP R2, R3
+ LDRLO R0, [R1], #4
+ STRLO R0, [R2], #4
+ BLO LoopRel
+
+/* Clear .bss section (Zero init) */
+ MOV R0, #0
+ LDR R1, =__bss_start__
+ LDR R2, =__bss_end__
+LoopZI: CMP R1, R2
+ STRLO R0, [R1], #4
+ BLO LoopZI
+
+
+.if (CPP_CONSTRUCTORS)
+/* call C++ constructors of global objects */
+ LDR r0, =__ctors_start__
+ LDR r1, =__ctors_end__
+ctor_loop:
+ CMP r0, r1
+ BEQ ctor_end
+ LDR r2, [r0], #4
+ STMFD sp!, {r0-r1}
+ MOV lr, pc
+/* MOV pc, r2 */
+ BX r2 /* mthomas 8/2006 */
+ LDMFD sp!, {r0-r1}
+ B ctor_loop
+ctor_end:
+.endif
+
+
+/* call main() */
+ ldr lr,=exit
+ ldr r0,=main
+ bx r0
+
+ .size _startup, . - _startup
+ .endfunc
+
+/* "exit" dummy added by mthomas to avoid sbrk write read etc. needed
+ by the newlib default "exit" */
+ .global exit
+ .func exit
+exit:
+ b .
+ .size exit, . - exit
+ .endfunc
+
+
+
+
+/*------------------------------------------------------------------------------
+//*- Manage exception
+//*---------------
+//*- This module The exception must be ensure in ARM mode
+//*------------------------------------------------------------------------------
+//*------------------------------------------------------------------------------
+//*- Function : IRQ_Handler_Entry
+//*- Treatments : IRQ Controller Interrupt Handler.
+//*- Called Functions : AIC_IVR[interrupt]
+//*------------------------------------------------------------------------------*/
+
+.if (VECTREMAPPED)
+.print "IRQ_Handler_Entry in section .fastrun -> .data"
+.section .fastrun, "ax"
+.else
+.print "IRQ_Handler_Entry in section .init -> .text"
+.section .init, "ax"
+.endif
+
+ .global IRQ_Handler_Entry
+ .func IRQ_Handler_Entry
+IRQ_Handler_Entry:
+/*---- Adjust and save return address on the stack */
+ sub lr, lr, #4
+ stmfd sp!, {lr}
+
+/*---- Save r0 and SPSR on the stack */
+ mrs r14, SPSR
+ stmfd sp!, {r0, r14}
+
+/*---- Write in the IVR to support Protect mode */
+/*---- No effect in Normal Mode */
+/*---- De-assert NIRQ and clear the source in Protect mode */
+ ldr r14, =AT91C_BASE_AIC
+ ldr r0, [r14, #AIC_IVR]
+ str r14, [r14, #AIC_IVR]
+
+/*---- Enable nested interrupts and switch to Supervisor mode */
+ msr CPSR_c, #ARM_MODE_SVC
+
+/*---- Save scratch/used registers and LR on the stack */
+ stmfd sp!, {r1-r3, r12, r14}
+
+/*---- Branch to the routine pointed by AIC_IVR */
+ mov r14, pc
+ bx r0
+
+/*---- Restore scratch/used registers and LR from the stack */
+ ldmia sp!, {r1-r3, r12, r14}
+
+/*---- Disable nested interrupts and switch back to IRQ mode */
+ msr CPSR_c, #I_BIT | ARM_MODE_IRQ
+
+/*---- Acknowledge interrupt by writing AIC_EOICR */
+ ldr r14, =AT91C_BASE_AIC
+ str r14, [r14, #AIC_EOICR]
+
+/*---- Restore SPSR and r0 from the stack */
+ ldmia sp!, {r0, r14}
+ msr SPSR_cxsf, r14
+
+/*---- Return from interrupt handler */
+ ldmia sp!, {pc}^
+
+ .size IRQ_Handler_Entry, . - IRQ_Handler_Entry
+ .endfunc
+
+
+/*---------------------------------------------------------------
+//* ?EXEPTION_VECTOR
+//* This module is only linked if needed for closing files.
+//*---------------------------------------------------------------*/
+ .global AT91F_Default_FIQ_handler
+ .func AT91F_Default_FIQ_handler
+AT91F_Default_FIQ_handler:
+ b AT91F_Default_FIQ_handler
+ .size AT91F_Default_FIQ_handler, . - AT91F_Default_FIQ_handler
+ .endfunc
+
+ .global AT91F_Default_IRQ_handler
+ .func AT91F_Default_IRQ_handler
+AT91F_Default_IRQ_handler:
+ b AT91F_Default_IRQ_handler
+ .size AT91F_Default_IRQ_handler, . - AT91F_Default_IRQ_handler
+ .endfunc
+
+ .global AT91F_Spurious_handler
+ .func AT91F_Spurious_handler
+AT91F_Spurious_handler:
+ b AT91F_Spurious_handler
+ .size AT91F_Spurious_handler, . - AT91F_Spurious_handler
+ .endfunc
+
+ .end
+
diff --git a/AT91SAM7S256/SAM7S256/Include/Cstartup_SAM7.c b/AT91SAM7S256/SAM7S256/Include/Cstartup_SAM7.c
index b23e3ac..c0a7da4 100644
--- a/AT91SAM7S256/SAM7S256/Include/Cstartup_SAM7.c
+++ b/AT91SAM7S256/SAM7S256/Include/Cstartup_SAM7.c
@@ -23,13 +23,18 @@ extern void AT91F_Spurious_handler(void);
extern void AT91F_Default_IRQ_handler(void);
extern void AT91F_Default_FIQ_handler(void);
+#ifdef __IAR_SYSTEMS_ICC__
+# define SECTION_ICODE @ "ICODE"
+#else
+# define SECTION_ICODE
+#endif
//*----------------------------------------------------------------------------
//* \fn AT91F_LowLevelInit
//* \brief This function performs very low level HW initialization
//* this function can be use a Stack, depending the compilation
//* optimization mode
//*----------------------------------------------------------------------------
-void AT91F_LowLevelInit( void) @ "ICODE"
+void AT91F_LowLevelInit( void) SECTION_ICODE
{
int i;
AT91PS_PMC pPMC = AT91C_BASE_PMC;
diff --git a/AT91SAM7S256/SAM7S256/Include/sam7s256.h b/AT91SAM7S256/SAM7S256/Include/sam7s256.h
index 332e39d..0118c40 100644
--- a/AT91SAM7S256/SAM7S256/Include/sam7s256.h
+++ b/AT91SAM7S256/SAM7S256/Include/sam7s256.h
@@ -15,7 +15,11 @@
#ifndef SAM7S256_H
#define SAM7S256_H
+#ifdef __IAR_SYSTEMS_ICC__
#include "ioat91sam7s256.h"
+#else
+#include "AT91SAM7S256.h"
+#endif
#define SAM7S256
diff --git a/AT91SAM7S256/SAM7S256/gcc/.gitignore b/AT91SAM7S256/SAM7S256/gcc/.gitignore
new file mode 100644
index 0000000..83a204c
--- /dev/null
+++ b/AT91SAM7S256/SAM7S256/gcc/.gitignore
@@ -0,0 +1,3 @@
+version.mak
+nxt_firmware.bin
+nxt_firmware.rfw
diff --git a/AT91SAM7S256/SAM7S256/gcc/Makefile b/AT91SAM7S256/SAM7S256/gcc/Makefile
new file mode 100644
index 0000000..304cbe2
--- /dev/null
+++ b/AT91SAM7S256/SAM7S256/gcc/Makefile
@@ -0,0 +1,96 @@
+BASE = ../..
+SRCDIR = $(BASE)/Source
+CPUINCDIR = $(BASE)/SAM7S256/Include
+
+GIT_VERSION := $(shell git rev-parse --short=7 HEAD)
+CUSTOM_FIRMWAREVERSION = $(GIT_VERSION)
+
+TARGET = nxt_firmware
+
+ARM_SOURCES =
+THUMB_SOURCES = c_button.c c_cmd.c c_comm.c c_display.c c_input.c c_ioctrl.c \
+ c_loader.c c_lowspeed.c c_output.c c_sound.c c_ui.c \
+ d_bt.c d_button.c d_display.c d_hispeed.c d_input.c \
+ d_ioctrl.c d_loader.c d_lowspeed.c d_output.c d_sound.c \
+ d_timer.c d_usb.c \
+ m_sched.c \
+ errno.c sbrk.c strtod.c sscanf.c \
+ Cstartup_SAM7.c
+
+ASM_ARM_SOURCE = Cstartup.S
+ASM_THUMB_SOURCE =
+
+vpath %.c $(SRCDIR)
+vpath %.c $(CPUINCDIR)
+vpath %.c lib
+vpath %.S $(CPUINCDIR)
+
+INCLUDES =
+
+MCU = arm7tdmi
+STARTOFUSERFLASH_DEFINES = -DSTARTOFUSERFLASH_FROM_LINKER=1
+VERSION_DEFINES = -DCUSTOM_FIRMWAREVERSION=\"$(CUSTOM_FIRMWAREVERSION)\"
+DEFINES = -DPROTOTYPE_PCB_4 -DNEW_MENU -DROM_RUN -DVECTORS_IN_RAM \
+ $(STARTOFUSERFLASH_DEFINES) $(VERSION_DEFINES)
+OPTIMIZE = -Os -fno-strict-aliasing \
+ -ffunction-sections -fdata-sections
+WARNINGS = -Wall -W -Wundef -Wno-unused -Wno-format
+THUMB_INTERWORK = -mthumb-interwork
+CFLAGS = -std=gnu99 -mcpu=$(MCU) $(THUMB) $(THUMB_INTERWORK) $(WARNINGS) $(OPTIMIZE)
+ASFLAGS = -mcpu=$(MCU) $(THUMB) $(THUMB_INTERWORK)
+CPPFLAGS = $(INCLUDES) $(DEFINES) -MMD
+LDSCRIPT = nxt.ld
+LDFLAGS = -nostdlib -T $(LDSCRIPT) -Wl,--gc-sections
+LDLIBS = -lc -lm -lgcc
+
+CROSS_COMPILE = arm-none-eabi-
+CC = $(CROSS_COMPILE)gcc
+OBJDUMP = $(CROSS_COMPILE)objdump
+OBJCOPY = $(CROSS_COMPILE)objcopy
+
+FWFLASH = fwflash
+
+ARM_OBJECTS = $(ARM_SOURCES:%.c=%.o) $(ASM_ARM_SOURCE:%.S=%.o)
+THUMB_OBJECTS = $(THUMB_SOURCES:%.c=%.o) $(THUMB_ARM_SOURCE:%.S=%.o)
+OBJECTS = $(ARM_OBJECTS) $(THUMB_OBJECTS)
+
+all: bin
+
+elf: $(TARGET).elf
+bin: $(TARGET).bin
+sym: $(TARGET).sym
+lst: $(TARGET).lst
+
+$(TARGET).elf: THUMB = -mthumb
+$(TARGET).elf: $(OBJECTS) $(LDSCRIPT)
+ $(LINK.c) $(OBJECTS) $(LOADLIBES) $(LDLIBS) -o $@
+
+%.bin: %.elf
+ $(OBJCOPY) --pad-to=0x140000 --gap-fill=0xff -O binary $< $@
+
+%.sym: %.elf
+ $(OBJDUMP) -h -t $< > $@
+
+%.lst: %.elf
+ $(OBJDUMP) -S $< > $@
+
+$(THUMB_OBJECTS): THUMB = -mthumb
+
+-include $(OBJECTS:%.o=%.d)
+
+LAST_CUSTOM_FIRMWAREVERSION=none
+-include version.mak
+ifneq ($(LAST_CUSTOM_FIRMWAREVERSION),$(CUSTOM_FIRMWAREVERSION))
+.PHONY: version.mak
+version.mak:
+ echo "LAST_CUSTOM_FIRMWAREVERSION = $(CUSTOM_FIRMWAREVERSION)" > $@
+endif
+
+c_ui.o: version.mak
+
+program: $(TARGET).bin
+ $(FWFLASH) $(TARGET).bin
+
+clean:
+ rm -f $(TARGET).elf $(TARGET).bin $(TARGET).sym $(TARGET).lst \
+ $(OBJECTS) $(OBJECTS:%.o=%.d) version.mak
diff --git a/AT91SAM7S256/SAM7S256/gcc/lib/errno.c b/AT91SAM7S256/SAM7S256/gcc/lib/errno.c
new file mode 100644
index 0000000..3eb52ac
--- /dev/null
+++ b/AT91SAM7S256/SAM7S256/gcc/lib/errno.c
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2010 Nicolas Schodet
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+/* This is needed for libm. Provide a non thread safe errno. */
+
+static int __the_errno;
+
+int *
+__errno (void)
+{
+ return &__the_errno;
+}
+
diff --git a/AT91SAM7S256/SAM7S256/gcc/lib/sbrk.c b/AT91SAM7S256/SAM7S256/gcc/lib/sbrk.c
new file mode 100644
index 0000000..317a94b
--- /dev/null
+++ b/AT91SAM7S256/SAM7S256/gcc/lib/sbrk.c
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2010 Nicolas Schodet
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+/* The newlib sprintf use dynamic allocation for floating point. Therefore,
+ * the sbrk syscall should be provided.
+ *
+ * This works by taking memory above BSS and below stack. There is no
+ * collision detection as it whould not known what to do then. */
+
+extern char _end;
+
+void *
+_sbrk (int incr)
+{
+ static char *heap = 0;
+ char *base;
+ /* Initialise if first call. */
+ if (heap == 0)
+ heap = &_end;
+ /* Increment and return old heap base. */
+ base = heap;
+ heap += incr;
+ return base;
+}
+
diff --git a/AT91SAM7S256/SAM7S256/gcc/lib/sscanf.c b/AT91SAM7S256/SAM7S256/gcc/lib/sscanf.c
new file mode 100644
index 0000000..a4f5e64
--- /dev/null
+++ b/AT91SAM7S256/SAM7S256/gcc/lib/sscanf.c
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2010 Nicolas Schodet
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+/* NXT source code is using sscanf to parse a float. Newlib sscanf will pull
+ * too many code, so here is a stub which implement just what is used. */
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdarg.h>
+
+int
+sscanf (const char *str, const char *fmt, ...)
+{
+ va_list ap;
+ float *f;
+ char *tailptr;
+ /* Only support use in NXT source code. */
+ if (fmt[0] != '%' || fmt[1] != 'f' || fmt[2] != '\0')
+ return 0;
+ /* Retrieve float pointer. */
+ va_start (ap, fmt);
+ f = va_arg (ap, float *);
+ va_end (ap);
+ /* Parse using the nice strtod. */
+ *f = strtod (str, &tailptr);
+ if (str == tailptr)
+ return 0;
+ else
+ return 1;
+}
+
diff --git a/AT91SAM7S256/SAM7S256/gcc/lib/strtod.c b/AT91SAM7S256/SAM7S256/gcc/lib/strtod.c
new file mode 100644
index 0000000..49d02a2
--- /dev/null
+++ b/AT91SAM7S256/SAM7S256/gcc/lib/strtod.c
@@ -0,0 +1,257 @@
+/*
+ * strtod.c --
+ *
+ * Source code for the "strtod" library procedure.
+ *
+ * Copyright (c) 1988-1993 The Regents of the University of California.
+ * Copyright (c) 1994 Sun Microsystems, Inc.
+ *
+ * Permission to use, copy, modify, and distribute this
+ * software and its documentation for any purpose and without
+ * fee is hereby granted, provided that the above copyright
+ * notice appear in all copies. The University of California
+ * makes no representations about the suitability of this
+ * software for any purpose. It is provided "as is" without
+ * express or implied warranty.
+ */
+
+#include <stdlib.h>
+#include <ctype.h>
+#include <errno.h>
+
+#ifndef TRUE
+#define TRUE 1
+#define FALSE 0
+#endif
+#ifndef NULL
+#define NULL 0
+#endif
+
+static int maxExponent = 511; /* Largest possible base 10 exponent. Any
+ * exponent larger than this will already
+ * produce underflow or overflow, so there's
+ * no need to worry about additional digits.
+ */
+static double powersOf10[] = { /* Table giving binary powers of 10. Entry */
+ 10., /* is 10^2^i. Used to convert decimal */
+ 100., /* exponents into floating-point numbers. */
+ 1.0e4,
+ 1.0e8,
+ 1.0e16,
+ 1.0e32,
+ 1.0e64,
+ 1.0e128,
+ 1.0e256
+};
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * strtod --
+ *
+ * This procedure converts a floating-point number from an ASCII
+ * decimal representation to internal double-precision format.
+ *
+ * Results:
+ * The return value is the double-precision floating-point
+ * representation of the characters in string. If endPtr isn't
+ * NULL, then *endPtr is filled in with the address of the
+ * next character after the last one that was part of the
+ * floating-point number.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+double
+strtod(string, endPtr)
+ const char *string; /* A decimal ASCII floating-point number,
+ * optionally preceded by white space.
+ * Must have form "-I.FE-X", where I is the
+ * integer part of the mantissa, F is the
+ * fractional part of the mantissa, and X
+ * is the exponent. Either of the signs
+ * may be "+", "-", or omitted. Either I
+ * or F may be omitted, or both. The decimal
+ * point isn't necessary unless F is present.
+ * The "E" may actually be an "e". E and X
+ * may both be omitted (but not just one).
+ */
+ char **endPtr; /* If non-NULL, store terminating character's
+ * address here. */
+{
+ int sign, expSign = FALSE;
+ double fraction, dblExp, *d;
+ register const char *p;
+ register int c;
+ int exp = 0; /* Exponent read from "EX" field. */
+ int fracExp = 0; /* Exponent that derives from the fractional
+ * part. Under normal circumstatnces, it is
+ * the negative of the number of digits in F.
+ * However, if I is very long, the last digits
+ * of I get dropped (otherwise a long I with a
+ * large negative exponent could cause an
+ * unnecessary overflow on I alone). In this
+ * case, fracExp is incremented one for each
+ * dropped digit. */
+ int mantSize; /* Number of digits in mantissa. */
+ int decPt; /* Number of mantissa digits BEFORE decimal
+ * point. */
+ const char *pExp; /* Temporarily holds location of exponent
+ * in string. */
+
+ /*
+ * Strip off leading blanks and check for a sign.
+ */
+
+ p = string;
+ while (isspace(*p)) {
+ p += 1;
+ }
+ if (*p == '-') {
+ sign = TRUE;
+ p += 1;
+ } else {
+ if (*p == '+') {
+ p += 1;
+ }
+ sign = FALSE;
+ }
+
+ /*
+ * Count the number of digits in the mantissa (including the decimal
+ * point), and also locate the decimal point.
+ */
+
+ decPt = -1;
+ for (mantSize = 0; ; mantSize += 1)
+ {
+ c = *p;
+ if (!isdigit(c)) {
+ if ((c != '.') || (decPt >= 0)) {
+ break;
+ }
+ decPt = mantSize;
+ }
+ p += 1;
+ }
+
+ /*
+ * Now suck up the digits in the mantissa. Use two integers to
+ * collect 9 digits each (this is faster than using floating-point).
+ * If the mantissa has more than 18 digits, ignore the extras, since
+ * they can't affect the value anyway.
+ */
+
+ pExp = p;
+ p -= mantSize;
+ if (decPt < 0) {
+ decPt = mantSize;
+ } else {
+ mantSize -= 1; /* One of the digits was the point. */
+ }
+ if (mantSize > 18) {
+ fracExp = decPt - 18;
+ mantSize = 18;
+ } else {
+ fracExp = decPt - mantSize;
+ }
+ if (mantSize == 0) {
+ fraction = 0.0;
+ p = string;
+ goto done;
+ } else {
+ int frac1, frac2;
+ frac1 = 0;
+ for ( ; mantSize > 9; mantSize -= 1)
+ {
+ c = *p;
+ p += 1;
+ if (c == '.') {
+ c = *p;
+ p += 1;
+ }
+ frac1 = 10*frac1 + (c - '0');
+ }
+ frac2 = 0;
+ for (; mantSize > 0; mantSize -= 1)
+ {
+ c = *p;
+ p += 1;
+ if (c == '.') {
+ c = *p;
+ p += 1;
+ }
+ frac2 = 10*frac2 + (c - '0');
+ }
+ fraction = (1.0e9 * frac1) + frac2;
+ }
+
+ /*
+ * Skim off the exponent.
+ */
+
+ p = pExp;
+ if ((*p == 'E') || (*p == 'e')) {
+ p += 1;
+ if (*p == '-') {
+ expSign = TRUE;
+ p += 1;
+ } else {
+ if (*p == '+') {
+ p += 1;
+ }
+ expSign = FALSE;
+ }
+ while (isdigit(*p)) {
+ exp = exp * 10 + (*p - '0');
+ p += 1;
+ }
+ }
+ if (expSign) {
+ exp = fracExp - exp;
+ } else {
+ exp = fracExp + exp;
+ }
+
+ /*
+ * Generate a floating-point number that represents the exponent.
+ * Do this by processing the exponent one bit at a time to combine
+ * many powers of 2 of 10. Then combine the exponent with the
+ * fraction.
+ */
+
+ if (exp < 0) {
+ expSign = TRUE;
+ exp = -exp;
+ } else {
+ expSign = FALSE;
+ }
+ if (exp > maxExponent) {
+ exp = maxExponent;
+ errno = ERANGE;
+ }
+ dblExp = 1.0;
+ for (d = powersOf10; exp != 0; exp >>= 1, d += 1) {
+ if (exp & 01) {
+ dblExp *= *d;
+ }
+ }
+ if (expSign) {
+ fraction /= dblExp;
+ } else {
+ fraction *= dblExp;
+ }
+
+done:
+ if (endPtr != NULL) {
+ *endPtr = (char *) p;
+ }
+
+ if (sign) {
+ return -fraction;
+ }
+ return fraction;
+}
diff --git a/AT91SAM7S256/SAM7S256/gcc/nxt.ld b/AT91SAM7S256/SAM7S256/gcc/nxt.ld
new file mode 100644
index 0000000..8e5f0cb
--- /dev/null
+++ b/AT91SAM7S256/SAM7S256/gcc/nxt.ld
@@ -0,0 +1,136 @@
+
+MEMORY
+{
+ CODE (rx) : ORIGIN = 0x00100000, LENGTH = 256k
+ DATA (rwx) : ORIGIN = 0x00200000, LENGTH = 64k
+}
+
+__FIRST_IN_RAM = ORIGIN(DATA);
+__TOP_STACK = ORIGIN(DATA) + LENGTH(DATA);
+
+/* Section Definitions */
+
+SECTIONS
+{
+ /* first section is .text which is used for code */
+ . = ORIGIN(CODE);
+
+ .text :
+ {
+ KEEP(*(.vectorg))
+ . = ALIGN(4);
+ KEEP(*(.init))
+ *(.text .text.*) /* remaining code */
+ *(.gnu.linkonce.t.*)
+ *(.glue_7)
+ *(.glue_7t)
+ *(.gcc_except_table)
+ *(.rodata) /* read-only data (constants) */
+ *(.rodata.*)
+ *(.gnu.linkonce.r.*)
+ . = ALIGN(4);
+ } >CODE
+
+ . = ALIGN(4);
+
+ /* .ctors .dtors are used for c++ constructors/destructors */
+
+ .ctors :
+ {
+ PROVIDE(__ctors_start__ = .);
+ KEEP(*(SORT(.ctors.*)))
+ KEEP(*(.ctors))
+ PROVIDE(__ctors_end__ = .);
+ } >CODE
+
+ .dtors :
+ {
+ PROVIDE(__dtors_start__ = .);
+ KEEP(*(SORT(.dtors.*)))
+ KEEP(*(.dtors))
+ PROVIDE(__dtors_end__ = .);
+ } >CODE
+
+ . = ALIGN(4);
+
+ _etext = . ;
+ PROVIDE (etext = .);
+
+ /* .data section which is used for initialized data */
+ .data : AT (_etext)
+ {
+ _data = . ;
+ KEEP(*(.vectmapped))
+ . = ALIGN(4);
+ *(.fastrun .fastrun.*)
+ . = ALIGN(4);
+ SORT(CONSTRUCTORS)
+ . = ALIGN(4);
+ *(.data)
+ *(.data.*)
+ *(.gnu.linkonce.d.*)
+ . = ALIGN(4);
+ } >DATA
+
+ . = ALIGN(4);
+
+ _edata = . ;
+ PROVIDE (edata = .);
+
+ __STARTOFUSERFLASH_FROM_LINKER =
+ ALIGN (LOADADDR (.data) + SIZEOF (.data), 0x100);
+
+ /* .bss section which is used for uninitialized data */
+ .bss (NOLOAD) :
+ {
+ __bss_start = . ;
+ __bss_start__ = . ;
+ *(.bss)
+ *(.bss.*)
+ *(.gnu.linkonce.b.*)
+ *(COMMON)
+ . = ALIGN(4);
+ } >DATA
+
+ . = ALIGN(4);
+
+ __bss_end__ = . ;
+
+ _end = .;
+ PROVIDE (end = .);
+
+ /* Stabs debugging sections. */
+ .stab 0 : { *(.stab) }
+ .stabstr 0 : { *(.stabstr) }
+ .stab.excl 0 : { *(.stab.excl) }
+ .stab.exclstr 0 : { *(.stab.exclstr) }
+ .stab.index 0 : { *(.stab.index) }
+ .stab.indexstr 0 : { *(.stab.indexstr) }
+ .comment 0 : { *(.comment) }
+ /* DWARF debug sections.
+ Symbols in the DWARF debugging sections are relative to the beginning
+ of the section so we begin them at 0. */
+ /* DWARF 1 */
+ .debug 0 : { *(.debug) }
+ .line 0 : { *(.line) }
+ /* GNU DWARF 1 extensions */
+ .debug_srcinfo 0 : { *(.debug_srcinfo) }
+ .debug_sfnames 0 : { *(.debug_sfnames) }
+ /* DWARF 1.1 and DWARF 2 */
+ .debug_aranges 0 : { *(.debug_aranges) }
+ .debug_pubnames 0 : { *(.debug_pubnames) }
+ /* DWARF 2 */
+ .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
+ .debug_abbrev 0 : { *(.debug_abbrev) }
+ .debug_line 0 : { *(.debug_line) }
+ .debug_frame 0 : { *(.debug_frame) }
+ .debug_str 0 : { *(.debug_str) }
+ .debug_loc 0 : { *(.debug_loc) }
+ .debug_macinfo 0 : { *(.debug_macinfo) }
+ /* SGI/MIPS DWARF 2 extensions */
+ .debug_weaknames 0 : { *(.debug_weaknames) }
+ .debug_funcnames 0 : { *(.debug_funcnames) }
+ .debug_typenames 0 : { *(.debug_typenames) }
+ .debug_varnames 0 : { *(.debug_varnames) }
+
+}
diff --git a/AT91SAM7S256/Source/BtTest.inc b/AT91SAM7S256/Source/BtTest.inc
index d2ab31d..148f43b 100644
--- a/AT91SAM7S256/Source/BtTest.inc
+++ b/AT91SAM7S256/Source/BtTest.inc
@@ -1,15 +1,18 @@
//******* TestPrg ************************************************************
+//#define TESTPRG // If defined the test program will be included
+
+#ifdef TESTPRG
#include "Test1.txt"
#include "Test2.txt"
-//#define TESTPRG // If defined the test program will be included
+#endif
extern void BtIo(void);
const char BUILD_DATE[] = __DATE__;
const char BUILD_TIME[] = __TIME__;
-const char MONTH[] = "JanFebMarAprMajJunJulAugSepOktNovDec";
+const char MONTH[] = "JanFebMarAprMayJunJulAugSepOctNovDec";
void GetProtocolVersion(UBYTE *String)
{
@@ -19,11 +22,16 @@ void GetProtocolVersion(UBYTE *String)
if (Tmp < 100)
{
- sprintf((char*)String,"FW NBC/NXC %2u.%02u",(FIRMWAREVERSION >> 8) & 0x00FF,Tmp & 0x00FF);
+#ifdef CUSTOM_FIRMWAREVERSION
+ int pad = (sizeof (CUSTOM_FIRMWAREVERSION) - 1) > 7 ? 1 : 1 + 7 - (sizeof (CUSTOM_FIRMWAREVERSION) - 1);
+ sprintf((char*)String,"FW %*u.%02um-%.7s", pad, (FIRMWAREVERSION >> 8) & 0x00FF,Tmp & 0x00FF, CUSTOM_FIRMWAREVERSION);
+#else
+ sprintf((char*)String,"FW %3u.%02um",(FIRMWAREVERSION >> 8) & 0x00FF,Tmp & 0x00FF);
+#endif
}
else
{
- sprintf((char*)String,"FW NBC/NXC %2X.%02X",(FIRMWAREVERSION >> 8) & 0x00FF,Tmp & 0x00FF);
+ sprintf((char*)String,"FW Hex %2X.%02Xm",(FIRMWAREVERSION >> 8) & 0x00FF,Tmp & 0x00FF);
}
}
diff --git a/AT91SAM7S256/Source/Connections.txt b/AT91SAM7S256/Source/Connections.txt
index 685304f..3c20ed0 100644
--- a/AT91SAM7S256/Source/Connections.txt
+++ b/AT91SAM7S256/Source/Connections.txt
@@ -1,4 +1,4 @@
-const ICON Connections[] =
+DEFINE_DATA(ICON, Connections) =
{
0x04,0x00, // Graphics Format
0x01,0x20, // Graphics DataSize
@@ -6,6 +6,7 @@ const ICON Connections[] =
0x04, // Graphics Count Y
0x18, // Graphics Width
0x18, // Graphics Height
+BEGIN_DATA
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x40,0x00,0x40,0x40,0x00,0x40,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xDB,0x00,0x00,0x7E,0x81,0x81,0x7E,0x00,0x00,0xDB,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x02,0x00,0x02,0x02,0x00,0x02,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
@@ -18,4 +19,5 @@ const ICON Connections[] =
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x40,0x00,0x40,0x40,0x00,0x40,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xDB,0x00,0x00,0x42,0x81,0x89,0x76,0x00,0x00,0xDB,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x02,0x00,0x02,0x02,0x00,0x02,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+END_DATA
};
diff --git a/AT91SAM7S256/Source/Cursor.txt b/AT91SAM7S256/Source/Cursor.txt
index d1e830e..69037cd 100644
--- a/AT91SAM7S256/Source/Cursor.txt
+++ b/AT91SAM7S256/Source/Cursor.txt
@@ -1,4 +1,5 @@
-const BMPMAP Cursor[] =
+#define sizeof_Cursor 15
+DEFINE_DATA(BMPMAP, Cursor) =
{
0x02,0x00, // Graphics Format
0x00,0x08, // Graphics DataSize
@@ -6,5 +7,7 @@ const BMPMAP Cursor[] =
0x00, // Graphics Start Y
0x07, // Graphics Width
0x08, // Graphics Height
+BEGIN_DATA
0x21,0x31,0x39,0x3D,0x39,0x31,0x21
+END_DATA
};
diff --git a/AT91SAM7S256/Source/Devices.txt b/AT91SAM7S256/Source/Devices.txt
index 57be902..cbfd564 100644
--- a/AT91SAM7S256/Source/Devices.txt
+++ b/AT91SAM7S256/Source/Devices.txt
@@ -1,4 +1,4 @@
-const ICON Devices[] =
+DEFINE_DATA(ICON, Devices) =
{
0x04,0x00, // Graphics Format
0x01,0x20, // Graphics DataSize
@@ -6,6 +6,7 @@ const ICON Devices[] =
0x04, // Graphics Count Y
0x18, // Graphics Width
0x18, // Graphics Height
+BEGIN_DATA
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x82,0x44,0x28,0xFF,0x11,0xAA,0x44,0x00,0x00,0x06,0x01,0x00,0x40,0x20,0x11,0x0E,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
@@ -18,4 +19,5 @@ const ICON Devices[] =
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xBF,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xBF,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x06,0x07,0x05,0x06,0x05,0x06,0x05,0x06,0x05,0x06,0x05,0x06,0x05,0x07,0x06,0x00,0x00,0x00,0x00
+END_DATA
};
diff --git a/AT91SAM7S256/Source/Display.txt b/AT91SAM7S256/Source/Display.txt
index 049eeaf..d1c2136 100644
--- a/AT91SAM7S256/Source/Display.txt
+++ b/AT91SAM7S256/Source/Display.txt
@@ -1,4 +1,4 @@
-const BMPMAP Display[] =
+DEFINE_DATA(BMPMAP, Display) =
{
0x02,0x00, // Graphics Format
0x00,0xD8, // Graphics DataSize
@@ -6,7 +6,9 @@ const BMPMAP Display[] =
0x10, // Graphics Start Y
0x48, // Graphics Width
0x18, // Graphics Height
+BEGIN_DATA
0xF8,0xFC,0x0E,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x0E,0xFC,0xF8,0xC0,
0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,
0x0F,0x1F,0x38,0x30,0x30,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x70,0x78,0x7F,0x3F,0x1F
+END_DATA
};
diff --git a/AT91SAM7S256/Source/Fail.txt b/AT91SAM7S256/Source/Fail.txt
index 6048462..a213ec5 100644
--- a/AT91SAM7S256/Source/Fail.txt
+++ b/AT91SAM7S256/Source/Fail.txt
@@ -1,4 +1,4 @@
-const BMPMAP Fail[] =
+DEFINE_DATA(BMPMAP, Fail) =
{
0x02,0x00, // Graphics Format
0x00,0x48, // Graphics DataSize
@@ -6,7 +6,9 @@ const BMPMAP Fail[] =
0x08, // Graphics Start Y
0x18, // Graphics Width
0x18, // Graphics Height
+BEGIN_DATA
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x60,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x30,0x0C,0x03,0x00,0x7C,0x00,0x03,0x0C,0x30,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x04,0x04,0x04,0x04,0x04,0x05,0x04,0x04,0x04,0x04,0x04,0x03,0x00,0x00,0x00,0x00,0x00
+END_DATA
};
diff --git a/AT91SAM7S256/Source/Font.txt b/AT91SAM7S256/Source/Font.txt
index e748f76..0aa4303 100644
--- a/AT91SAM7S256/Source/Font.txt
+++ b/AT91SAM7S256/Source/Font.txt
@@ -1,4 +1,4 @@
-const ICON Font[] =
+DEFINE_DATA(ICON, Font) =
{
0x04,0x00, // Graphics Format
0x02,0x40, // Graphics DataSize
@@ -6,10 +6,12 @@ const ICON Font[] =
0x06, // Graphics Count Y
0x06, // Graphics Width
0x08, // Graphics Height
+BEGIN_DATA
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x5F,0x06,0x00,0x00,0x07,0x03,0x00,0x07,0x03,0x00,0x24,0x7E,0x24,0x7E,0x24,0x00,0x24,0x2B,0x6A,0x12,0x00,0x00,0x63,0x13,0x08,0x64,0x63,0x00,0x30,0x4C,0x52,0x22,0x50,0x00,0x00,0x07,0x03,0x00,0x00,0x00,0x00,0x3E,0x41,0x00,0x00,0x00,0x00,0x41,0x3E,0x00,0x00,0x00,0x08,0x3E,0x1C,0x3E,0x08,0x00,0x08,0x08,0x3E,0x08,0x08,0x00,0x80,0x60,0x60,0x00,0x00,0x00,0x08,0x08,0x08,0x08,0x08,0x00,0x00,0x60,0x60,0x00,0x00,0x00,0x20,0x10,0x08,0x04,0x02,0x00,
0x3E,0x51,0x49,0x45,0x3E,0x00,0x00,0x42,0x7F,0x40,0x00,0x00,0x62,0x51,0x49,0x49,0x46,0x00,0x22,0x49,0x49,0x49,0x36,0x00,0x18,0x14,0x12,0x7F,0x10,0x00,0x2F,0x49,0x49,0x49,0x31,0x00,0x3C,0x4A,0x49,0x49,0x30,0x00,0x01,0x71,0x09,0x05,0x03,0x00,0x36,0x49,0x49,0x49,0x36,0x00,0x06,0x49,0x49,0x29,0x1E,0x00,0x00,0x6C,0x6C,0x00,0x00,0x00,0x00,0xEC,0x6C,0x00,0x00,0x00,0x08,0x14,0x22,0x41,0x00,0x00,0x24,0x24,0x24,0x24,0x24,0x00,0x00,0x41,0x22,0x14,0x08,0x00,0x02,0x01,0x59,0x09,0x06,0x00,
0x3E,0x41,0x5D,0x55,0x1E,0x00,0x7E,0x11,0x11,0x11,0x7E,0x00,0x7F,0x49,0x49,0x49,0x36,0x00,0x3E,0x41,0x41,0x41,0x22,0x00,0x7F,0x41,0x41,0x41,0x3E,0x00,0x7F,0x49,0x49,0x49,0x41,0x00,0x7F,0x09,0x09,0x09,0x01,0x00,0x3E,0x41,0x49,0x49,0x7A,0x00,0x7F,0x08,0x08,0x08,0x7F,0x00,0x00,0x41,0x7F,0x41,0x00,0x00,0x30,0x40,0x40,0x40,0x3F,0x00,0x7F,0x08,0x14,0x22,0x41,0x00,0x7F,0x40,0x40,0x40,0x40,0x00,0x7F,0x02,0x04,0x02,0x7F,0x00,0x7F,0x02,0x04,0x08,0x7F,0x00,0x3E,0x41,0x41,0x41,0x3E,0x00,
0x7F,0x09,0x09,0x09,0x06,0x00,0x3E,0x41,0x51,0x21,0x5E,0x00,0x7F,0x09,0x09,0x19,0x66,0x00,0x26,0x49,0x49,0x49,0x32,0x00,0x01,0x01,0x7F,0x01,0x01,0x00,0x3F,0x40,0x40,0x40,0x3F,0x00,0x1F,0x20,0x40,0x20,0x1F,0x00,0x3F,0x40,0x3C,0x40,0x3F,0x00,0x63,0x14,0x08,0x14,0x63,0x00,0x07,0x08,0x70,0x08,0x07,0x00,0x71,0x49,0x45,0x43,0x00,0x00,0x00,0x7F,0x41,0x41,0x00,0x00,0x02,0x04,0x08,0x10,0x20,0x00,0x00,0x41,0x41,0x7F,0x00,0x00,0x04,0x02,0x01,0x02,0x04,0x00,0x80,0x80,0x80,0x80,0x80,0x00,
0x00,0x02,0x05,0x02,0x00,0x00,0x20,0x54,0x54,0x54,0x78,0x00,0x7F,0x44,0x44,0x44,0x38,0x00,0x38,0x44,0x44,0x44,0x28,0x00,0x38,0x44,0x44,0x44,0x7F,0x00,0x38,0x54,0x54,0x54,0x08,0x00,0x08,0x7E,0x09,0x09,0x00,0x00,0x18,0x24,0xA4,0xA4,0xFC,0x00,0x7F,0x04,0x04,0x78,0x00,0x00,0x00,0x00,0x7D,0x40,0x00,0x00,0x40,0x80,0x84,0x7D,0x00,0x00,0x7F,0x10,0x28,0x44,0x00,0x00,0x00,0x00,0x7F,0x40,0x00,0x00,0x7C,0x04,0x18,0x04,0x78,0x00,0x7C,0x04,0x04,0x78,0x00,0x00,0x38,0x44,0x44,0x44,0x38,0x00,
0xFC,0x44,0x44,0x44,0x38,0x00,0x38,0x44,0x44,0x44,0xFC,0x00,0x44,0x78,0x44,0x04,0x08,0x00,0x08,0x54,0x54,0x54,0x20,0x00,0x04,0x3E,0x44,0x24,0x00,0x00,0x3C,0x40,0x20,0x7C,0x00,0x00,0x1C,0x20,0x40,0x20,0x1C,0x00,0x3C,0x60,0x30,0x60,0x3C,0x00,0x6C,0x10,0x10,0x6C,0x00,0x00,0x9C,0xA0,0x60,0x3C,0x00,0x00,0x64,0x54,0x54,0x4C,0x00,0x00,0x08,0x3E,0x41,0x41,0x00,0x00,0x00,0x00,0x77,0x00,0x00,0x00,0x00,0x41,0x41,0x3E,0x08,0x00,0x02,0x01,0x02,0x01,0x00,0x00,0x10,0x20,0x40,0x38,0x07,0x00
+END_DATA
};
diff --git a/AT91SAM7S256/Source/Functions.inl b/AT91SAM7S256/Source/Functions.inl
index 54df0c4..a547619 100644
--- a/AT91SAM7S256/Source/Functions.inl
+++ b/AT91SAM7S256/Source/Functions.inl
@@ -87,19 +87,19 @@ const UBYTE SENSORFORMAT[SENSORS][9] =
const float SENSORDIVIDER[SENSORS] =
{
- 1.0, // MENU_SENSOR_EMPTY
- 1.0, // MENU_SENSOR_SOUND_DB
- 1.0, // MENU_SENSOR_SOUND_DBA
- 1.0, // MENU_SENSOR_LIGHT
- 1.0, // MENU_SENSOR_LIGHT_AMB
- 1.0, // MENU_SENSOR_TOUCH
- 1.0, // MENU_SENSOR_MOTOR_DEG
- 360.0, // MENU_SENSOR_MOTOR_ROT
- 2.54, // MENU_SENSOR_ULTRASONIC_IN
- 1.0, // MENU_SENSOR_ULTRASONIC_CM
- 10.0, // MENU_SENSOR_IIC_TEMP_C
- 10.0, // MENU_SENSOR_IIC_TEMP_F
- 1.0 // MENU_SENSOR_COLOR
+ 1.0f, // MENU_SENSOR_EMPTY
+ 1.0f, // MENU_SENSOR_SOUND_DB
+ 1.0f, // MENU_SENSOR_SOUND_DBA
+ 1.0f, // MENU_SENSOR_LIGHT
+ 1.0f, // MENU_SENSOR_LIGHT_AMB
+ 1.0f, // MENU_SENSOR_TOUCH
+ 1.0f, // MENU_SENSOR_MOTOR_DEG
+ 360.0f, // MENU_SENSOR_MOTOR_ROT
+ 2.54f, // MENU_SENSOR_ULTRASONIC_IN
+ 1.0f, // MENU_SENSOR_ULTRASONIC_CM
+ 10.0f, // MENU_SENSOR_IIC_TEMP_C
+ 10.0f, // MENU_SENSOR_IIC_TEMP_F
+ 1.0f // MENU_SENSOR_COLOR
};
@@ -328,11 +328,11 @@ void cUiUpdateSensor(SWORD Time)
{
if (Sensor == MENU_SENSOR_IIC_TEMP_F)
{
- VarsUi.DatalogSampleValue[Port - MENU_PORT_1] = (SLONG)((float)(Tmp + 4544) / (float)14.2);
+ VarsUi.DatalogSampleValue[Port - MENU_PORT_1] = (SLONG)((float)(Tmp + 4544) / 14.2f);
}
else
{
- VarsUi.DatalogSampleValue[Port - MENU_PORT_1] = (SLONG)((float)Tmp / (float)25.6);
+ VarsUi.DatalogSampleValue[Port - MENU_PORT_1] = (SLONG)((float)Tmp / 25.6f);
}
VarsUi.DatalogSampleValid[Port - MENU_PORT_1] = TRUE;
}
@@ -1138,7 +1138,7 @@ UBYTE cUiVolume(UBYTE Action) // MENU_INIT,MENU_LEFT,MENU_RIGHT,MENU_EXIT
#ifndef STRIPPED
VarsUi.pTmp = (UBYTE*)Cursor;
- for (VarsUi.Tmp = 0;(VarsUi.Tmp < SIZE_OF_CURSOR) && (VarsUi.Tmp < (UBYTE)sizeof(Cursor));VarsUi.Tmp++)
+ for (VarsUi.Tmp = 0;(VarsUi.Tmp < SIZE_OF_CURSOR) && (VarsUi.Tmp < (UBYTE)SIZEOF_DATA(Cursor));VarsUi.Tmp++)
{
VarsUi.CursorTmp[VarsUi.Tmp] = *VarsUi.pTmp;
VarsUi.pTmp++;
@@ -2105,7 +2105,7 @@ UBYTE cUiOnBrickProgramming(UBYTE Action) // On brick programming
pMapDisplay->EraseMask |= SCREEN_BIT(SCREEN_LARGE);
VarsUi.pTmp = (UBYTE*)Cursor;
- for (VarsUi.Tmp = 0;(VarsUi.Tmp < SIZE_OF_CURSOR) && (VarsUi.Tmp < (UBYTE)sizeof(Cursor));VarsUi.Tmp++)
+ for (VarsUi.Tmp = 0;(VarsUi.Tmp < SIZE_OF_CURSOR) && (VarsUi.Tmp < (UBYTE)SIZEOF_DATA(Cursor));VarsUi.Tmp++)
{
VarsUi.CursorTmp[VarsUi.Tmp] = *VarsUi.pTmp;
VarsUi.pTmp++;
@@ -2145,7 +2145,7 @@ UBYTE cUiOnBrickProgramming(UBYTE Action) // On brick programming
case 0 :
{
VarsUi.pTmp = (UBYTE*)Cursor;
- for (VarsUi.Tmp = 0;(VarsUi.Tmp < SIZE_OF_CURSOR) && (VarsUi.Tmp < (UBYTE)sizeof(Cursor));VarsUi.Tmp++)
+ for (VarsUi.Tmp = 0;(VarsUi.Tmp < SIZE_OF_CURSOR) && (VarsUi.Tmp < (UBYTE)SIZEOF_DATA(Cursor));VarsUi.Tmp++)
{
VarsUi.CursorTmp[VarsUi.Tmp] = *VarsUi.pTmp;
VarsUi.pTmp++;
@@ -3987,7 +3987,7 @@ UBYTE cUiPowerOffTime(UBYTE Action) // MENU_INIT,MENU_LEFT,MENU_RIGHT,MENU_E
#ifndef STRIPPED
VarsUi.pTmp = (UBYTE*)Cursor;
- for (VarsUi.Tmp = 0;(VarsUi.Tmp < SIZE_OF_CURSOR) && (VarsUi.Tmp < (UBYTE)sizeof(Cursor));VarsUi.Tmp++)
+ for (VarsUi.Tmp = 0;(VarsUi.Tmp < SIZE_OF_CURSOR) && (VarsUi.Tmp < (UBYTE)SIZEOF_DATA(Cursor));VarsUi.Tmp++)
{
VarsUi.CursorTmp[VarsUi.Tmp] = *VarsUi.pTmp;
VarsUi.pTmp++;
diff --git a/AT91SAM7S256/Source/Icons.txt b/AT91SAM7S256/Source/Icons.txt
index 0d58409..459b078 100644
--- a/AT91SAM7S256/Source/Icons.txt
+++ b/AT91SAM7S256/Source/Icons.txt
@@ -1,4 +1,4 @@
-const ICON Icons[] =
+DEFINE_DATA(ICON, Icons) =
{
0x04,0x00, // Graphics Format
0x1A,0x70, // Graphics DataSize
@@ -6,6 +6,7 @@ const ICON Icons[] =
0x5E, // Graphics Count Y
0x18, // Graphics Width
0x18, // Graphics Height
+BEGIN_DATA
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
@@ -288,4 +289,5 @@ const ICON Icons[] =
0x00,0x00,0x00,0x00,0x80,0x40,0x20,0x10,0x20,0x40,0x80,0xE0,0xE0,0x00,0x80,0x40,0x20,0x10,0x20,0x40,0x80,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x79,0x86,0x44,0x28,0x10,0x00,0x01,0x83,0x01,0x00,0x10,0x28,0x44,0xFA,0x01,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x02,0x05,0x08,0x10,0x08,0x04,0x0A,0x09,0x08,0x09,0x06,0x04,0x08,0x10,0x08,0x05,0x02,0x00,0x00,0x00
+END_DATA
};
diff --git a/AT91SAM7S256/Source/Info.txt b/AT91SAM7S256/Source/Info.txt
index d56d7e2..7e2b639 100644
--- a/AT91SAM7S256/Source/Info.txt
+++ b/AT91SAM7S256/Source/Info.txt
@@ -1,4 +1,4 @@
-const BMPMAP Info[] =
+DEFINE_DATA(BMPMAP, Info) =
{
0x02,0x00, // Graphics Format
0x00,0x48, // Graphics DataSize
@@ -6,7 +6,9 @@ const BMPMAP Info[] =
0x08, // Graphics Start Y
0x18, // Graphics Width
0x18, // Graphics Height
+BEGIN_DATA
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x40,0x40,0x80,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x40,0xA0,0x90,0x20,0x20,0x40,0x40,0x30,0x8C,0x73,0x0C,0x03,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x02,0x02,0x02,0x02,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+END_DATA
};
diff --git a/AT91SAM7S256/Source/LowBattery.txt b/AT91SAM7S256/Source/LowBattery.txt
index e5a0769..51b8ddb 100644
--- a/AT91SAM7S256/Source/LowBattery.txt
+++ b/AT91SAM7S256/Source/LowBattery.txt
@@ -1,4 +1,4 @@
-const BMPMAP LowBattery[] =
+DEFINE_DATA(BMPMAP, LowBattery) =
{
0x02,0x00, // Graphics Format
0x02,0xA0, // Graphics DataSize
@@ -6,6 +6,7 @@ const BMPMAP LowBattery[] =
0x08, // Graphics Start Y
0x60, // Graphics Width
0x38, // Graphics Height
+BEGIN_DATA
0x02,0xF2,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0xF2,0x82,0x02,
0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x20,0x18,0x04,0x02,0x02,0x01,0x01,0x01,0x00,0xF0,0xF8,0xFC,0xFC,0xF8,0xF0,0x00,0x01,0x01,0x01,0x02,0x02,0x04,0x18,0x20,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x00,
0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x7F,0xFF,0xFF,0x7F,0x3F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x00,
@@ -13,4 +14,5 @@ const BMPMAP LowBattery[] =
0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x00,0x00,0x00,0x00,0x00,0xE0,0x10,0x10,0x10,0xE0,0x00,0xF0,0x00,0xC0,0x00,0xF0,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0xF2,0x92,0x92,0x94,0x64,0x04,0xE4,0x14,0x14,0x14,0xE4,0x02,0x12,0x12,0xF1,0x11,0x10,0x00,0x10,0x10,0xF0,0x10,0x10,0x00,0xF0,0x90,0x90,0x90,0x10,0x00,0xF0,0x90,0x90,0x90,0x60,0x00,0x70,0x80,0x00,0x80,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x00,
0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x04,0x04,0x04,0x04,0x00,0x03,0x04,0x04,0x04,0x03,0x00,0x03,0x04,0x03,0x04,0x03,0x00,0x00,0x00,0x00,0xC0,0x40,0xF0,0x17,0x14,0x14,0x14,0x13,0x10,0x17,0x11,0x11,0x11,0x17,0x10,0x10,0xD0,0xD7,0x10,0xF0,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x07,0x04,0x04,0x04,0x04,0x00,0x07,0x00,0x00,0x01,0x06,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x00,
0x00,0x3F,0x20,0x20,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x63,0x62,0x6F,0x68,0x68,0x68,0x68,0x68,0x68,0x68,0x68,0x68,0x68,0x68,0x68,0x68,0x6B,0x6B,0x68,0x6F,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x7F,0x7F,0x00
+END_DATA
};
diff --git a/AT91SAM7S256/Source/Ok.txt b/AT91SAM7S256/Source/Ok.txt
index 3a4b186..32bad41 100644
--- a/AT91SAM7S256/Source/Ok.txt
+++ b/AT91SAM7S256/Source/Ok.txt
@@ -1,4 +1,4 @@
-const BMPMAP Ok[] =
+DEFINE_DATA(BMPMAP, Ok) =
{
0x02,0x00, // Graphics Format
0x00,0x20, // Graphics DataSize
@@ -6,6 +6,8 @@ const BMPMAP Ok[] =
0x30, // Graphics Start Y
0x10, // Graphics Width
0x10, // Graphics Height
+BEGIN_DATA
0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x38,0xC4,0x34,0x08,0x00,0xFF,
0xFF,0x04,0x0A,0x19,0x12,0x22,0x24,0x24,0x23,0x18,0x07,0x00,0x00,0x00,0x00,0xFF
+END_DATA
};
diff --git a/AT91SAM7S256/Source/Port.txt b/AT91SAM7S256/Source/Port.txt
index 9367003..292fccc 100644
--- a/AT91SAM7S256/Source/Port.txt
+++ b/AT91SAM7S256/Source/Port.txt
@@ -1,4 +1,4 @@
-const ICON Port[] =
+DEFINE_DATA(ICON, Port) =
{
0x04,0x00, // Graphics Format
0x00,0x18, // Graphics DataSize
@@ -6,5 +6,7 @@ const ICON Port[] =
0x01, // Graphics Count Y
0x03, // Graphics Width
0x08, // Graphics Height
+BEGIN_DATA
0x70,0x88,0x70,0x90,0xF8,0x80,0xC8,0xA8,0x90,0x88,0xA8,0x50,0x38,0x20,0xF8,0xF0,0x28,0xF0,0xF8,0xA8,0x50,0x70,0x88,0x50
+END_DATA
};
diff --git a/AT91SAM7S256/Source/RCXintro_1.txt b/AT91SAM7S256/Source/RCXintro_1.txt
index 5ae955c..456a63d 100644
--- a/AT91SAM7S256/Source/RCXintro_1.txt
+++ b/AT91SAM7S256/Source/RCXintro_1.txt
@@ -1,4 +1,4 @@
-const BMPMAP RCXintro_1[] =
+DEFINE_DATA(BMPMAP, RCXintro_1) =
{
0x02,0x00, // Graphics Format
0x02,0x00, // Graphics DataSize
@@ -6,6 +6,7 @@ const BMPMAP RCXintro_1[] =
0x00, // Graphics Start Y
0x40, // Graphics Width
0x40, // Graphics Height
+BEGIN_DATA
0xFF,0x01,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0x01,0xFF,
0xFF,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0xFF,
0xFF,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x7F,0x1F,0x8F,0xC7,0xE7,0x67,0x33,0x33,0x33,0x67,0xE7,0x8F,0xCF,0xE7,0x67,0x63,0x33,0x33,0x33,0x33,0x33,0x27,0x67,0xCF,0xCF,0xE7,0x67,0x63,0x33,0x33,0x33,0x33,0x33,0x63,0x67,0xC7,0x8F,0x8F,0xCF,0x67,0x67,0x23,0x33,0x33,0x33,0x33,0x63,0x67,0xC7,0x8F,0x1F,0x33,0xF3,0xFF,0x00,0xFF,
@@ -14,4 +15,5 @@ const BMPMAP RCXintro_1[] =
0xFF,0x00,0xFF,0xFE,0xFC,0xF8,0xF3,0xF3,0xE6,0xE6,0xE6,0xE6,0xE6,0xF2,0xF3,0xF9,0xF9,0xF3,0xF6,0xE6,0xE6,0xE6,0xE6,0xE6,0xF3,0xF3,0xF9,0xF9,0xF3,0xF3,0xE6,0xE6,0xE6,0xE6,0xE6,0xE6,0xF3,0xF3,0xF9,0xFC,0xFC,0xF9,0xF3,0xF3,0xE6,0xE6,0xE6,0xE6,0xE6,0xE6,0xF3,0xF3,0xF9,0xF8,0xFC,0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0xFF,
0xFF,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0xFF,
0xFF,0x80,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0x80,0xFF
+END_DATA
};
diff --git a/AT91SAM7S256/Source/RCXintro_10.txt b/AT91SAM7S256/Source/RCXintro_10.txt
index e5349cc..5f98538 100644
--- a/AT91SAM7S256/Source/RCXintro_10.txt
+++ b/AT91SAM7S256/Source/RCXintro_10.txt
@@ -1,4 +1,4 @@
-const BMPMAP RCXintro_10[] =
+DEFINE_DATA(BMPMAP, RCXintro_10) =
{
0x02,0x00, // Graphics Format
0x00,0x20, // Graphics DataSize
@@ -6,6 +6,8 @@ const BMPMAP RCXintro_10[] =
0x20, // Graphics Start Y
0x0A, // Graphics Width
0x10, // Graphics Height
+BEGIN_DATA
0xFE,0xFE,0x06,0x06,0x66,0x66,0x06,0x06,0xFE,0xFE,
0x07,0x07,0x06,0x06,0x00,0x00,0x06,0x06,0x07,0x07
+END_DATA
};
diff --git a/AT91SAM7S256/Source/RCXintro_11.txt b/AT91SAM7S256/Source/RCXintro_11.txt
index a8891b5..6afaabd 100644
--- a/AT91SAM7S256/Source/RCXintro_11.txt
+++ b/AT91SAM7S256/Source/RCXintro_11.txt
@@ -1,4 +1,4 @@
-const BMPMAP RCXintro_11[] =
+DEFINE_DATA(BMPMAP, RCXintro_11) =
{
0x02,0x00, // Graphics Format
0x00,0x10, // Graphics DataSize
@@ -6,6 +6,8 @@ const BMPMAP RCXintro_11[] =
0x20, // Graphics Start Y
0x08, // Graphics Width
0x10, // Graphics Height
+BEGIN_DATA
0xF8,0xF8,0x18,0xD8,0xD8,0x18,0xF8,0xF8,
0x07,0x07,0x06,0x00,0x00,0x06,0x07,0x07
+END_DATA
};
diff --git a/AT91SAM7S256/Source/RCXintro_12.txt b/AT91SAM7S256/Source/RCXintro_12.txt
index 386beb2..b89f65c 100644
--- a/AT91SAM7S256/Source/RCXintro_12.txt
+++ b/AT91SAM7S256/Source/RCXintro_12.txt
@@ -1,4 +1,4 @@
-const BMPMAP RCXintro_12[] =
+DEFINE_DATA(BMPMAP, RCXintro_12) =
{
0x02,0x00, // Graphics Format
0x00,0xC0, // Graphics DataSize
@@ -6,6 +6,8 @@ const BMPMAP RCXintro_12[] =
0x20, // Graphics Start Y
0x5E, // Graphics Width
0x10, // Graphics Height
+BEGIN_DATA
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0xF8,0x18,0xD8,0xD8,0x18,0xF8,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x07,0x07,0x00,0x00,0x07,0x07,0x00,0x00,0x07,0x07,0x00,0x00,0x07,0x07,0x00,0x00,0x07,0x07,0x00,0x00,0x00,0x00,0x07,0x07,0x00,0x00,0x07,0x07,0x00,0x00,0x00,0x00,0x07,0x07,0x00,0x00,0x06,0x06,0x00,0x00,0x00,0x07,0x07,0x00,0x00,0x00,0x00,0x00,0x07,0x07,0x00,0x00,0x00,0x00,0x00,0x07,0x07,0x06,0x00,0x00,0x06,0x07,0x07,0x00,0x00,0x07,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x07,0x00,0x00,0x07,0x07,0x00,0x00,0x07,0x07,0x00,0x00,0x06,0x06,0x00,0x00,0x00,0x07,0x07
+END_DATA
};
diff --git a/AT91SAM7S256/Source/RCXintro_13.txt b/AT91SAM7S256/Source/RCXintro_13.txt
index 84b1753..ee512ea 100644
--- a/AT91SAM7S256/Source/RCXintro_13.txt
+++ b/AT91SAM7S256/Source/RCXintro_13.txt
@@ -1,4 +1,4 @@
-const BMPMAP RCXintro_13[] =
+DEFINE_DATA(BMPMAP, RCXintro_13) =
{
0x02,0x00, // Graphics Format
0x00,0xC0, // Graphics DataSize
@@ -6,6 +6,8 @@ const BMPMAP RCXintro_13[] =
0x20, // Graphics Start Y
0x5E, // Graphics Width
0x10, // Graphics Height
+BEGIN_DATA
0xE0,0xE0,0x00,0x00,0xE0,0xE0,0x00,0x00,0xE0,0xE0,0x00,0x00,0xE0,0xE0,0x00,0x00,0xE0,0xE0,0x00,0x00,0x00,0x00,0xE0,0xE0,0x00,0x00,0xE0,0xE0,0x00,0x00,0x00,0x00,0xE0,0xE0,0x00,0x00,0xE0,0xE0,0x00,0x00,0x00,0xC0,0xC0,0x00,0x00,0x00,0x00,0x00,0xE0,0xE0,0x00,0x00,0x00,0x00,0x00,0xF8,0xF8,0x18,0xD8,0xD8,0x18,0xF8,0xF8,0x00,0x00,0xE0,0xE0,0x00,0x00,0x00,0x00,0x20,0x20,0x00,0x00,0xE0,0xE0,0x00,0x00,0xE0,0xE0,0x00,0x00,0xE0,0xE0,0x00,0x00,0xE0,0xE0,0x00,0x00,0x00,0xC0,0xC0,
0x07,0x07,0x00,0x00,0x07,0x07,0x00,0x00,0x07,0x07,0x00,0x00,0x07,0x07,0x00,0x00,0x07,0x07,0x00,0x00,0x00,0x00,0x07,0x07,0x00,0x00,0x07,0x07,0x00,0x00,0x00,0x00,0x07,0x07,0x00,0x00,0x06,0x06,0x00,0x00,0x00,0x07,0x07,0x00,0x00,0x00,0x00,0x00,0x07,0x07,0x00,0x00,0x00,0x00,0x00,0x07,0x07,0x06,0x00,0x00,0x06,0x07,0x07,0x00,0x00,0x07,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x07,0x00,0x00,0x07,0x07,0x00,0x00,0x07,0x07,0x00,0x00,0x06,0x06,0x00,0x00,0x00,0x07,0x07
+END_DATA
};
diff --git a/AT91SAM7S256/Source/RCXintro_14.txt b/AT91SAM7S256/Source/RCXintro_14.txt
index dc4254a..feb4cd7 100644
--- a/AT91SAM7S256/Source/RCXintro_14.txt
+++ b/AT91SAM7S256/Source/RCXintro_14.txt
@@ -1,4 +1,4 @@
-const BMPMAP RCXintro_14[] =
+DEFINE_DATA(BMPMAP, RCXintro_14) =
{
0x02,0x00, // Graphics Format
0x00,0xC0, // Graphics DataSize
@@ -6,6 +6,8 @@ const BMPMAP RCXintro_14[] =
0x20, // Graphics Start Y
0x5E, // Graphics Width
0x10, // Graphics Height
+BEGIN_DATA
0xF8,0xF8,0x00,0x00,0xF8,0xF8,0x00,0x00,0xF8,0xF8,0x00,0x00,0xF8,0xF8,0x00,0x00,0xF8,0xF8,0x00,0x00,0x00,0x00,0xF8,0xF8,0x00,0x00,0xF8,0xF8,0x00,0x00,0x00,0x00,0xFE,0xFE,0x00,0x00,0xF8,0xF8,0x00,0x00,0x00,0xD8,0xD8,0x00,0x00,0x00,0x00,0x00,0xF8,0xF8,0x00,0x00,0x00,0x00,0x00,0xF8,0xF8,0x18,0xD8,0xD8,0x18,0xF8,0xF8,0x00,0x00,0xF8,0xF8,0x00,0x00,0x00,0x00,0x38,0x38,0x00,0x00,0xF8,0xF8,0x00,0x00,0xF8,0xF8,0x00,0x00,0xF8,0xF8,0x00,0x00,0xF8,0xF8,0x00,0x00,0x00,0xD8,0xD8,
0x07,0x07,0x00,0x00,0x07,0x07,0x00,0x00,0x07,0x07,0x00,0x00,0x07,0x07,0x00,0x00,0x07,0x07,0x00,0x00,0x00,0x00,0x07,0x07,0x00,0x00,0x07,0x07,0x00,0x00,0x00,0x00,0x07,0x07,0x00,0x00,0x06,0x06,0x00,0x00,0x00,0x07,0x07,0x00,0x00,0x00,0x00,0x00,0x07,0x07,0x00,0x00,0x00,0x00,0x00,0x07,0x07,0x06,0x00,0x00,0x06,0x07,0x07,0x00,0x00,0x07,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x07,0x00,0x00,0x07,0x07,0x00,0x00,0x07,0x07,0x00,0x00,0x06,0x06,0x00,0x00,0x00,0x07,0x07
+END_DATA
};
diff --git a/AT91SAM7S256/Source/RCXintro_15.txt b/AT91SAM7S256/Source/RCXintro_15.txt
index ae03d45..71f51e0 100644
--- a/AT91SAM7S256/Source/RCXintro_15.txt
+++ b/AT91SAM7S256/Source/RCXintro_15.txt
@@ -1,4 +1,4 @@
-const BMPMAP RCXintro_15[] =
+DEFINE_DATA(BMPMAP, RCXintro_15) =
{
0x02,0x00, // Graphics Format
0x00,0xC0, // Graphics DataSize
@@ -6,6 +6,8 @@ const BMPMAP RCXintro_15[] =
0x20, // Graphics Start Y
0x5E, // Graphics Width
0x10, // Graphics Height
+BEGIN_DATA
0xF8,0xF8,0x18,0x00,0xF8,0xF8,0x18,0x00,0xF8,0xF8,0x00,0x00,0xF8,0xF8,0x00,0x00,0xF8,0xF8,0x18,0x18,0x00,0x00,0xF8,0xF8,0x00,0x00,0xF8,0xF8,0x18,0x18,0x00,0x00,0xFE,0xFE,0x00,0x00,0xF8,0xF8,0x18,0x00,0xC0,0xD8,0xD8,0x00,0x00,0x18,0x18,0x00,0xF8,0xF8,0x18,0x00,0x00,0x00,0x00,0xF8,0xF8,0x18,0xD8,0xD8,0x18,0xF8,0xF8,0x00,0x00,0xF8,0xF8,0x18,0x00,0x00,0x18,0x38,0x38,0x00,0x00,0xF8,0xF8,0x18,0x00,0xF8,0xF8,0x18,0x00,0xF8,0xF8,0x00,0x00,0xF8,0xF8,0x18,0x00,0xC0,0xD8,0xD8,
0x07,0x07,0x00,0x00,0x07,0x07,0x00,0x00,0x07,0x07,0x00,0x00,0x07,0x07,0x00,0x00,0x07,0x07,0x00,0x00,0x00,0x00,0x07,0x07,0x00,0x00,0x07,0x07,0x00,0x00,0x06,0x06,0x07,0x07,0x00,0x00,0x06,0x06,0x06,0x00,0x00,0x07,0x07,0x00,0x00,0x00,0x00,0x00,0x07,0x07,0x00,0x00,0x00,0x00,0x00,0x07,0x07,0x06,0x00,0x00,0x06,0x07,0x07,0x00,0x00,0x07,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x07,0x00,0x00,0x07,0x07,0x00,0x00,0x07,0x07,0x00,0x00,0x06,0x06,0x06,0x00,0x00,0x07,0x07
+END_DATA
};
diff --git a/AT91SAM7S256/Source/RCXintro_16.txt b/AT91SAM7S256/Source/RCXintro_16.txt
index 47504a8..9cf470c 100644
--- a/AT91SAM7S256/Source/RCXintro_16.txt
+++ b/AT91SAM7S256/Source/RCXintro_16.txt
@@ -1,4 +1,4 @@
-const BMPMAP RCXintro_16[] =
+DEFINE_DATA(BMPMAP, RCXintro_16) =
{
0x02,0x00, // Graphics Format
0x00,0xC0, // Graphics DataSize
@@ -6,6 +6,8 @@ const BMPMAP RCXintro_16[] =
0x20, // Graphics Start Y
0x5E, // Graphics Width
0x10, // Graphics Height
+BEGIN_DATA
0xF8,0xF8,0x18,0x18,0xF8,0xF8,0x18,0x18,0xF8,0xF8,0x00,0x00,0xF8,0xF8,0x00,0x00,0xF8,0xF8,0x18,0x18,0x18,0x18,0xF8,0xF8,0x00,0x00,0xF8,0xF8,0x18,0x18,0x18,0x18,0xFE,0xFE,0x00,0x00,0xF8,0xF8,0xD8,0xD8,0xD8,0xD8,0xD8,0x00,0x00,0x18,0x18,0x18,0xF8,0xF8,0x18,0x18,0x18,0x00,0x00,0xF8,0xF8,0x18,0xD8,0xD8,0x18,0xF8,0xF8,0x00,0x00,0xF8,0xF8,0x18,0x18,0x18,0x18,0x38,0x38,0x00,0x00,0xF8,0xF8,0x18,0x18,0xF8,0xF8,0x18,0x18,0xF8,0xF8,0x00,0x00,0xF8,0xF8,0xD8,0xD8,0xD8,0xD8,0xD8,
0x07,0x07,0x00,0x00,0x07,0x07,0x00,0x00,0x07,0x07,0x00,0x00,0x07,0x07,0x00,0x00,0x07,0x07,0x00,0x00,0x00,0x00,0x07,0x07,0x00,0x00,0x07,0x07,0x06,0x06,0x06,0x06,0x07,0x07,0x00,0x00,0x06,0x06,0x06,0x06,0x06,0x07,0x07,0x00,0x00,0x00,0x00,0x00,0x07,0x07,0x00,0x00,0x00,0x00,0x00,0x07,0x07,0x06,0x00,0x00,0x06,0x07,0x07,0x00,0x00,0x07,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x07,0x00,0x00,0x07,0x07,0x00,0x00,0x07,0x07,0x00,0x00,0x06,0x06,0x06,0x06,0x06,0x07,0x07
+END_DATA
};
diff --git a/AT91SAM7S256/Source/RCXintro_2.txt b/AT91SAM7S256/Source/RCXintro_2.txt
index 42698ea..addecb2 100644
--- a/AT91SAM7S256/Source/RCXintro_2.txt
+++ b/AT91SAM7S256/Source/RCXintro_2.txt
@@ -1,4 +1,4 @@
-const BMPMAP RCXintro_2[] =
+DEFINE_DATA(BMPMAP, RCXintro_2) =
{
0x02,0x00, // Graphics Format
0x02,0x00, // Graphics DataSize
@@ -6,6 +6,7 @@ const BMPMAP RCXintro_2[] =
0x00, // Graphics Start Y
0x40, // Graphics Width
0x40, // Graphics Height
+BEGIN_DATA
0xFC,0x02,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0x02,0xFC,
0xFF,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x7F,0x3F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x3F,0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0xFF,
0xFF,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x7F,0x1F,0x8F,0xC7,0xE7,0x67,0x30,0x30,0x30,0x60,0xE0,0x80,0xC0,0xE0,0x60,0x60,0x30,0x30,0x30,0x30,0x30,0x20,0x60,0xC0,0xC0,0xE0,0x60,0x60,0x30,0x30,0x30,0x30,0x30,0x60,0x60,0xC0,0x80,0x80,0xC0,0x60,0x60,0x20,0x33,0x33,0x33,0x33,0x63,0x67,0xC7,0x8F,0x1F,0x33,0xF3,0xFF,0x00,0xFF,
@@ -14,4 +15,5 @@ const BMPMAP RCXintro_2[] =
0xFF,0x00,0xFF,0xFE,0xFE,0xFC,0xF3,0xF3,0xE6,0xE6,0xE6,0xE6,0xE6,0xF2,0x83,0x01,0x01,0x03,0x06,0x06,0x06,0x06,0x06,0x06,0x03,0x03,0x01,0x01,0x03,0x03,0x06,0x06,0x06,0x06,0x06,0x06,0x03,0x03,0x01,0x00,0x00,0x01,0x03,0x03,0x06,0x06,0x06,0x06,0x06,0x86,0xF3,0xFB,0xF9,0xFC,0xFE,0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0xFF,
0xFF,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0xFC,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0xFF,
0x3F,0x40,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0x40,0x3F
+END_DATA
};
diff --git a/AT91SAM7S256/Source/RCXintro_3.txt b/AT91SAM7S256/Source/RCXintro_3.txt
index 308de3a..eba6710 100644
--- a/AT91SAM7S256/Source/RCXintro_3.txt
+++ b/AT91SAM7S256/Source/RCXintro_3.txt
@@ -1,4 +1,4 @@
-const BMPMAP RCXintro_3[] =
+DEFINE_DATA(BMPMAP, RCXintro_3) =
{
0x02,0x00, // Graphics Format
0x02,0x00, // Graphics DataSize
@@ -6,6 +6,7 @@ const BMPMAP RCXintro_3[] =
0x00, // Graphics Start Y
0x40, // Graphics Width
0x40, // Graphics Height
+BEGIN_DATA
0xFC,0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0xFC,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x7F,0x3F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x3F,0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
@@ -14,4 +15,5 @@ const BMPMAP RCXintro_3[] =
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0xFC,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xFC,0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x3F,0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x7F,0x3F
+END_DATA
};
diff --git a/AT91SAM7S256/Source/RCXintro_4.txt b/AT91SAM7S256/Source/RCXintro_4.txt
index cf969c2..dc15847 100644
--- a/AT91SAM7S256/Source/RCXintro_4.txt
+++ b/AT91SAM7S256/Source/RCXintro_4.txt
@@ -1,4 +1,4 @@
-const BMPMAP RCXintro_4[] =
+DEFINE_DATA(BMPMAP, RCXintro_4) =
{
0x02,0x00, // Graphics Format
0x02,0x00, // Graphics DataSize
@@ -6,6 +6,7 @@ const BMPMAP RCXintro_4[] =
0x00, // Graphics Start Y
0x40, // Graphics Width
0x40, // Graphics Height
+BEGIN_DATA
0xFC,0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0xFC,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x7F,0x3F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x3F,0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
@@ -14,4 +15,5 @@ const BMPMAP RCXintro_4[] =
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0xFC,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xFC,0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x3F,0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x7F,0x3F
+END_DATA
};
diff --git a/AT91SAM7S256/Source/RCXintro_5.txt b/AT91SAM7S256/Source/RCXintro_5.txt
index f5bdbd3..efd3cb9 100644
--- a/AT91SAM7S256/Source/RCXintro_5.txt
+++ b/AT91SAM7S256/Source/RCXintro_5.txt
@@ -1,4 +1,4 @@
-const BMPMAP RCXintro_5[] =
+DEFINE_DATA(BMPMAP, RCXintro_5) =
{
0x02,0x00, // Graphics Format
0x01,0xC0, // Graphics DataSize
@@ -6,6 +6,7 @@ const BMPMAP RCXintro_5[] =
0x00, // Graphics Start Y
0x34, // Graphics Width
0x40, // Graphics Height
+BEGIN_DATA
0x80,0xC0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xC0,0x80,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x03,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
@@ -14,4 +15,5 @@ const BMPMAP RCXintro_5[] =
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xF0,0xE0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xE0,0xF0,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x7F,
0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00,0x00
+END_DATA
};
diff --git a/AT91SAM7S256/Source/RCXintro_6.txt b/AT91SAM7S256/Source/RCXintro_6.txt
index 103a310..4ab152a 100644
--- a/AT91SAM7S256/Source/RCXintro_6.txt
+++ b/AT91SAM7S256/Source/RCXintro_6.txt
@@ -1,4 +1,4 @@
-const BMPMAP RCXintro_6[] =
+DEFINE_DATA(BMPMAP, RCXintro_6) =
{
0x02,0x00, // Graphics Format
0x01,0x20, // Graphics DataSize
@@ -6,10 +6,12 @@ const BMPMAP RCXintro_6[] =
0x08, // Graphics Start Y
0x2C, // Graphics Width
0x30, // Graphics Height
+BEGIN_DATA
0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x07,0x03,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x03,0x07,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x03,0x03,0x03,0x03,0x03,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0xFC,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xFC,0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x07,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x07
+END_DATA
};
diff --git a/AT91SAM7S256/Source/RCXintro_7.txt b/AT91SAM7S256/Source/RCXintro_7.txt
index 2451fe4..cabcc7b 100644
--- a/AT91SAM7S256/Source/RCXintro_7.txt
+++ b/AT91SAM7S256/Source/RCXintro_7.txt
@@ -1,4 +1,4 @@
-const BMPMAP RCXintro_7[] =
+DEFINE_DATA(BMPMAP, RCXintro_7) =
{
0x02,0x00, // Graphics Format
0x00,0xC8, // Graphics DataSize
@@ -6,9 +6,11 @@ const BMPMAP RCXintro_7[] =
0x10, // Graphics Start Y
0x22, // Graphics Width
0x28, // Graphics Height
+BEGIN_DATA
0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x7F,0x7F,0x7F,0x7F,0x7F,0x7F,0x7F,0x7F,0x7F,0x7F,0x7F,0x7F,0x7F,0x7F,0x7F,0x7F,0x7F,0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xC0,0xC0,0xC0,0xC0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x0F,0x0F,0x0F,0x0F,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFC,0xF8,0xF8,0xF8,0xF8,0xF8,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0xF8,0xF8,0xF8,0xF8,0xF8,0xFC,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x01,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x01
+END_DATA
};
diff --git a/AT91SAM7S256/Source/RCXintro_8.txt b/AT91SAM7S256/Source/RCXintro_8.txt
index 51107b0..d062714 100644
--- a/AT91SAM7S256/Source/RCXintro_8.txt
+++ b/AT91SAM7S256/Source/RCXintro_8.txt
@@ -1,4 +1,4 @@
-const BMPMAP RCXintro_8[] =
+DEFINE_DATA(BMPMAP, RCXintro_8) =
{
0x02,0x00, // Graphics Format
0x00,0x48, // Graphics DataSize
@@ -6,7 +6,9 @@ const BMPMAP RCXintro_8[] =
0x18, // Graphics Start Y
0x16, // Graphics Width
0x18, // Graphics Height
+BEGIN_DATA
0xFE,0xFF,0xFF,0xFF,0x1F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x1F,0xFF,0xFF,0xFF,0xFE,
0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x1E,0x1E,0x1E,0x1E,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,
0x1F,0x3F,0x3F,0x3F,0x3E,0x3C,0x3C,0x3C,0x3C,0x00,0x00,0x00,0x00,0x3C,0x3C,0x3C,0x3C,0x3E,0x3F,0x3F,0x3F,0x1F
+END_DATA
};
diff --git a/AT91SAM7S256/Source/RCXintro_9.txt b/AT91SAM7S256/Source/RCXintro_9.txt
index 479704c..3952437 100644
--- a/AT91SAM7S256/Source/RCXintro_9.txt
+++ b/AT91SAM7S256/Source/RCXintro_9.txt
@@ -1,4 +1,4 @@
-const BMPMAP RCXintro_9[] =
+DEFINE_DATA(BMPMAP, RCXintro_9) =
{
0x02,0x00, // Graphics Format
0x00,0x30, // Graphics DataSize
@@ -6,7 +6,9 @@ const BMPMAP RCXintro_9[] =
0x18, // Graphics Start Y
0x0E, // Graphics Width
0x18, // Graphics Height
+BEGIN_DATA
0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,
0xFF,0xFF,0xFF,0x00,0x00,0x3C,0x3C,0x3C,0x3C,0x00,0x00,0xFF,0xFF,0xFF,
0x07,0x07,0x07,0x07,0x07,0x00,0x00,0x00,0x00,0x07,0x07,0x07,0x07,0x07
+END_DATA
};
diff --git a/AT91SAM7S256/Source/Running.txt b/AT91SAM7S256/Source/Running.txt
index 963e372..6bea492 100644
--- a/AT91SAM7S256/Source/Running.txt
+++ b/AT91SAM7S256/Source/Running.txt
@@ -1,4 +1,4 @@
-const ICON Running[] =
+DEFINE_DATA(ICON, Running) =
{
0x04,0x00, // Graphics Format
0x04,0x80, // Graphics DataSize
@@ -6,6 +6,7 @@ const ICON Running[] =
0x10, // Graphics Count Y
0x18, // Graphics Width
0x18, // Graphics Height
+BEGIN_DATA
0x00,0x00,0x00,0xE0,0xF0,0x38,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x38,0xF0,0xE0,0x00,0x00,0x00,
0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x3C,0x3C,0x3C,0x3C,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0x00,
0x00,0x00,0x00,0x07,0x0F,0x1C,0x18,0x18,0x18,0x18,0x00,0x00,0x00,0x00,0x18,0x18,0x18,0x18,0x1C,0x0F,0x07,0x00,0x00,0x00,
@@ -54,4 +55,5 @@ const ICON Running[] =
0x00,0x00,0x00,0xE0,0xF0,0x38,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x38,0xF0,0xE0,0x00,0x00,0x00,
0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x3C,0x3C,0x3C,0x3C,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0x00,
0x00,0x00,0x00,0x07,0x0F,0x1C,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x00,0x00,0x00,0x00,0x18,0x1C,0x0F,0x07,0x00,0x00,0x00
+END_DATA
};
diff --git a/AT91SAM7S256/Source/Status.txt b/AT91SAM7S256/Source/Status.txt
index 7434a7a..6d1d5bd 100644
--- a/AT91SAM7S256/Source/Status.txt
+++ b/AT91SAM7S256/Source/Status.txt
@@ -1,4 +1,4 @@
-const ICON Status[] =
+DEFINE_DATA(ICON, Status) =
{
0x04,0x00, // Graphics Format
0x01,0xB0, // Graphics DataSize
@@ -6,10 +6,12 @@ const ICON Status[] =
0x06, // Graphics Count Y
0x0C, // Graphics Width
0x08, // Graphics Height
+BEGIN_DATA
0x00,0x00,0x7E,0x81,0x81,0x19,0x19,0x81,0x81,0x7E,0x00,0x00,0x00,0x00,0x7E,0x01,0x01,0x99,0x99,0x81,0x81,0x7E,0x00,0x00,0x00,0x00,0x1E,0x81,0x81,0x99,0x99,0x81,0x81,0x7E,0x00,0x00,0x00,0x00,0x66,0x81,0x81,0x99,0x99,0x81,0x81,0x7E,0x00,0x00,0x00,0x00,0x78,0x81,0x81,0x99,0x99,0x81,0x81,0x7E,0x00,0x00,0x00,0x00,0x7E,0x80,0x80,0x99,0x99,0x81,0x81,0x7E,0x00,0x00,
0x00,0x00,0x7E,0x81,0x81,0x98,0x98,0x81,0x81,0x7E,0x00,0x00,0x00,0x00,0x7E,0x81,0x81,0x99,0x99,0x80,0x80,0x7E,0x00,0x00,0x00,0x00,0x7E,0x81,0x81,0x99,0x99,0x81,0x81,0x78,0x00,0x00,0x00,0x00,0x7E,0x81,0x81,0x99,0x99,0x81,0x81,0x66,0x00,0x00,0x00,0x00,0x7E,0x81,0x81,0x99,0x99,0x81,0x81,0x1E,0x00,0x00,0x00,0x00,0x7E,0x81,0x81,0x99,0x99,0x01,0x01,0x7E,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x24,0x24,0x24,0x24,0x24,0x3C,0x3C,0x00,0x00,0x00,0x00,0x18,0x24,0x24,0x24,0x24,0x3C,0x3C,0x3C,0x00,0x00,0x00,0x00,0x18,0x24,0x24,0x3C,0x3C,0x3C,0x3C,0x3C,0x00,0x00,0x00,0x00,0x18,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x24,0x24,0x24,0x24,0x24,0x3C,0x3C,0x00,0x00,0x00,0x00,0x18,0x24,0x24,0x24,0x24,0x3C,0x3C,0x3C,0x00,0x00,0x00,0x00,0x18,0x24,0x24,0x3C,0x3C,0x3C,0x3C,0x3C,0x00,0x00,0x00,0x00,0x18,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x22,0x14,0x7F,0x2A,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x22,0x14,0x7F,0x2A,0x14,0x00,0x08,0x14,0x22,0x00,0x00,0x00,0x22,0x14,0x7F,0x2A,0x14,0x00,0x00,0x00,0x22,0x14,0x08,0x00,0x22,0x14,0x7F,0x2A,0x14,0x00,0x08,0x14,0x22,0x14,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3E,0x22,0x1C,0x00,0x3E,0x0A,0x02,0x00,0x3E,0x20,0x3E,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x14,0x1C,0x08,0x08,0x08,0x08,0x08,0x1C,0x14,0x14,0x00,0x3E,0x20,0x3E,0x00,0x2E,0x2A,0x3A,0x00,0x3E,0x2A,0x3E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+END_DATA
};
diff --git a/AT91SAM7S256/Source/Step.txt b/AT91SAM7S256/Source/Step.txt
index dcec616..cba0c0d 100644
--- a/AT91SAM7S256/Source/Step.txt
+++ b/AT91SAM7S256/Source/Step.txt
@@ -1,4 +1,4 @@
-const ICON Step[] =
+DEFINE_DATA(ICON, Step) =
{
0x04,0x00, // Graphics Format
0x02,0xC0, // Graphics DataSize
@@ -6,6 +6,7 @@ const ICON Step[] =
0x04, // Graphics Count Y
0x0B, // Graphics Width
0x10, // Graphics Height
+BEGIN_DATA
0xFF,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0xFF,0xFF,0x01,0x01,0x11,0x19,0x7D,0x19,0x11,0x01,0x01,0xFF,0xFF,0x01,0x01,0x11,0x19,0x7D,0x19,0x11,0x05,0x01,0xFF,0xFF,0x01,0x11,0x39,0x7D,0x11,0x1D,0x01,0x05,0x01,0xFF,0xFF,0x01,0x11,0x39,0x7D,0x11,0x71,0x01,0x01,0x01,0xFF,0xFF,0x01,0x11,0x39,0x7D,0x11,0x71,0x01,0x05,0x01,0xFF,0xFF,0x01,0x01,0x01,0x1D,0x11,0x7D,0x39,0x11,0x01,0xFF,0xFF,0x01,0x01,0x01,0x71,0x11,0x7D,0x39,0x11,0x01,0xFF,
0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
0xFF,0x01,0x05,0x01,0x71,0x11,0x7D,0x39,0x11,0x01,0xFF,0xFF,0x01,0x11,0x39,0x7D,0x11,0x1D,0x01,0x01,0x01,0xFF,0xFF,0x01,0x01,0x21,0x71,0x71,0x3D,0x01,0x01,0x01,0xFF,0xFF,0x01,0x01,0x21,0x71,0x71,0x3D,0x01,0x01,0x01,0xFF,0xFF,0x01,0x01,0x11,0x31,0x7D,0x31,0x11,0x01,0x01,0xFF,0xFF,0x01,0x01,0x11,0x31,0x7D,0x31,0x11,0x05,0x01,0xFF,0xFF,0x01,0x05,0x01,0x1D,0x11,0x7D,0x39,0x11,0x01,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
@@ -14,4 +15,5 @@ const ICON Step[] =
0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
0xFF,0x01,0x01,0x39,0x7D,0x7D,0x7D,0x39,0x01,0x01,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x01,0x39,0x41,0x45,0x4F,0x45,0x39,0x01,0x01,0xFF,0xFF,0x01,0x49,0x55,0x25,0x01,0x05,0x7D,0x05,0x01,0xFF,
0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01
+END_DATA
};
diff --git a/AT91SAM7S256/Source/Test1.txt b/AT91SAM7S256/Source/Test1.txt
index 9c1d663..018d27d 100644
--- a/AT91SAM7S256/Source/Test1.txt
+++ b/AT91SAM7S256/Source/Test1.txt
@@ -1,4 +1,4 @@
-const BMPMAP Test1[] =
+DEFINE_DATA(BMPMAP, Test1) =
{
0x02,0x00, // Graphics Format
0x04,0x00, // Graphics DataSize
@@ -6,6 +6,7 @@ const BMPMAP Test1[] =
0x00, // Graphics Start Y
0x80, // Graphics Width
0x40, // Graphics Height
+BEGIN_DATA
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
@@ -14,4 +15,5 @@ const BMPMAP Test1[] =
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
+END_DATA
};
diff --git a/AT91SAM7S256/Source/Test2.txt b/AT91SAM7S256/Source/Test2.txt
index 2419c27..2553335 100644
--- a/AT91SAM7S256/Source/Test2.txt
+++ b/AT91SAM7S256/Source/Test2.txt
@@ -1,4 +1,4 @@
-const BMPMAP Test2[] =
+DEFINE_DATA(BMPMAP, Test2) =
{
0x02,0x00, // Graphics Format
0x04,0x00, // Graphics DataSize
@@ -6,6 +6,7 @@ const BMPMAP Test2[] =
0x00, // Graphics Start Y
0x80, // Graphics Width
0x40, // Graphics Height
+BEGIN_DATA
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
@@ -14,4 +15,5 @@ const BMPMAP Test2[] =
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+END_DATA
};
diff --git a/AT91SAM7S256/Source/Ui.txt b/AT91SAM7S256/Source/Ui.txt
index 1a29c67..5746a55 100644
--- a/AT91SAM7S256/Source/Ui.txt
+++ b/AT91SAM7S256/Source/Ui.txt
@@ -1,4 +1,4 @@
-const TXT Ui[] =
+DEFINE_DATA(TXT, Ui) =
{
0x05,0x00, // Text Format
0x04,0x0D, // Text DataSize
@@ -6,6 +6,7 @@ const TXT Ui[] =
0x32, // ItemsY
0x11, // ItemCharsX
0x01, // ItemCharsY
+BEGIN_DATA
'F','a','i','l','e','d','!', 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
'C','o','n','n','e','c','t','i','n','g', 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
'L','i','n','e',' ','i','s',' ','b','u','s','y', 0 , 0 , 0 , 0 , 0 ,
@@ -56,4 +57,5 @@ const TXT Ui[] =
'M','e','m','o','r','y',' ','i','s', 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
'f','u','l','l','!', 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
'N','e','v','e','r', 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0
+END_DATA
};
diff --git a/AT91SAM7S256/Source/Wait.txt b/AT91SAM7S256/Source/Wait.txt
index a29d06b..abdbd43 100644
--- a/AT91SAM7S256/Source/Wait.txt
+++ b/AT91SAM7S256/Source/Wait.txt
@@ -1,4 +1,4 @@
-const BMPMAP Wait[] =
+DEFINE_DATA(BMPMAP, Wait) =
{
0x02,0x00, // Graphics Format
0x00,0x48, // Graphics DataSize
@@ -6,7 +6,9 @@ const BMPMAP Wait[] =
0x08, // Graphics Start Y
0x18, // Graphics Width
0x18, // Graphics Height
+BEGIN_DATA
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC3,0x24,0x98,0xC2,0x98,0x24,0xC3,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+END_DATA
};
diff --git a/AT91SAM7S256/Source/c_cmd.c b/AT91SAM7S256/Source/c_cmd.c
index 2909201..d2b2203 100644
--- a/AT91SAM7S256/Source/c_cmd.c
+++ b/AT91SAM7S256/Source/c_cmd.c
@@ -702,6 +702,7 @@ UWORD cCmdHandleRemoteCommands(UBYTE * pInBuf, UBYTE * pOutBuf, UBYTE * pLen)
pIn->SensorType = pInBuf[2];
pIn->SensorMode = pInBuf[3];
+
//Set InvalidData flag automatically since type may have changed
pIn->InvalidData = TRUE;
}
@@ -2305,7 +2306,7 @@ void cCmdResetDevices(void)
for (i = 0; i < NO_OF_INPUTS; i++)
{
- INPUTSTRUCT * pIn = &(pMapInput->Inputs[i]);
+ INPUTSTRUCT * pIn = &(pMapInput->Inputs[i]);
//Clear type and mode to defaults
pIn->SensorType = NO_SENSOR;
pIn->SensorMode = RAWMODE;
@@ -3672,12 +3673,12 @@ NXT_STATUS cCmdDatalogRead(UBYTE * pBuffer, UWORD Length, UBYTE Remove)
NXT_STATUS cCmdColorSensorRead (UBYTE Port, SWORD * SensorValue, UWORD * RawArray, UWORD * NormalizedArray,
SWORD * ScaledArray, UBYTE * InvalidData)
{
- ULONG i;
+ ULONG i;
//Make sure Port is valid for Color Sensor
- INPUTSTRUCT * pIn = &(pMapInput->Inputs[Port]);
+ INPUTSTRUCT * pIn = &(pMapInput->Inputs[Port]);
UBYTE sType = pIn->SensorType;
- if (!(sType == COLORFULL || sType == COLORRED || sType == COLORGREEN ||
- sType == COLORBLUE || sType == COLORNONE))
+ if (!(sType == COLORFULL || sType == COLORRED || sType == COLORGREEN ||
+ sType == COLORBLUE || sType == COLORNONE))
{
return (ERR_COMM_CHAN_NOT_READY); //TODO - is this the right error?
}
@@ -3687,9 +3688,9 @@ NXT_STATUS cCmdColorSensorRead (UBYTE Port, SWORD * SensorValue, UWORD * RawArra
//Copy all raw, normalized and scaled data from I/O Map
for (i=0; i<NO_OF_COLORS; i++){
COLORSTRUCT * pColor = &(pMapInput->Colors[Port]);
- RawArray[i] = pColor->ADRaw[i];
+ RawArray[i] = pColor->ADRaw[i];
NormalizedArray[i] = pColor->SensorRaw[i];
- ScaledArray[i] = pColor->SensorValue[i];
+ ScaledArray[i] = pColor->SensorValue[i];
}
//Copy the Invalid Data Flag
*InvalidData = pIn->InvalidData;
@@ -3882,11 +3883,11 @@ ULONG cCmdGetSByte(void * pVal) {
ULONG cCmdGetFloat(void * pVal) {
float tempVal = *(float*)pVal;
- if (tempVal >= (float)0.0) {
- tempVal += (float)0.5;
+ if (tempVal >= 0.0f) {
+ tempVal += 0.5f;
}
else {
- tempVal -= (float)0.5;
+ tempVal -= 0.5f;
}
return (ULONG)tempVal;
}
@@ -5230,7 +5231,7 @@ NXT_STATUS cCmdInterpUnop2(CODE_WORD * const pCode)
if (TypeCode2 == TC_FLOAT)
{
FltArgVal2 = cCmdGetFloatValFromDataArg(Arg2, 0);
- if ((FltArgVal2 > (float)99999999999.9999)||(FltArgVal2 < (float)-9999999999.9999)){ // these are the widest %.4f numbers that will fit on display
+ if ((FltArgVal2 > 99999999999.9999f)||(FltArgVal2 < -9999999999.9999f)){ // these are the widest %.4f numbers that will fit on display
Count = sprintf(Buffer, "%.6g", FltArgVal2);
}
else
@@ -7836,7 +7837,7 @@ NXT_STATUS cCmdLSWrite(UBYTE Port, UBYTE BufLength, UBYTE *pBuf, UBYTE ResponseL
//Only start writing process if port is properly configured and c_lowspeed module is ready
if ((pInput->SensorType == LOWSPEED_9V || pInput->SensorType == LOWSPEED)
&& (pInput->InvalidData == FALSE)
- && (LOWSPEED_IDLE == *pChState) || (LOWSPEED_ERROR == *pChState))
+ && (*pChState == LOWSPEED_IDLE) || (*pChState == LOWSPEED_ERROR))
{
pOutBuf->InPtr = 0;
pOutBuf->OutPtr = 0;
diff --git a/AT91SAM7S256/Source/c_cmd.h b/AT91SAM7S256/Source/c_cmd.h
index d857581..ec09cdc 100644
--- a/AT91SAM7S256/Source/c_cmd.h
+++ b/AT91SAM7S256/Source/c_cmd.h
@@ -41,9 +41,9 @@ void cCmdExit(void);
//
//ARM_NXT vs SIM_NXT
//These definitions are set up to allow compiling this code for use in a simulated (non-ARM7) environment.
-//If your toolchain doesn't automatically use the __ICCARM__ token, define it to ensure normal compilation.
+//If your toolchain doesn't automatically use the __ICCARM__ or __arm__ token, define it to ensure normal compilation.
//
-#ifdef __ICCARM__
+#if defined (__ICCARM__) || (defined (__GNUC__) && defined (__arm__))
#define ARM_NXT
#else
#define SIM_NXT
diff --git a/AT91SAM7S256/Source/c_input.c b/AT91SAM7S256/Source/c_input.c
index 319bad4..f6c7fa7 100644
--- a/AT91SAM7S256/Source/c_input.c
+++ b/AT91SAM7S256/Source/c_input.c
@@ -67,63 +67,6 @@ enum
CUSTOM_SETUP = 0x80
};
-
-const SWORD TempConvTable[] =
-{
-/* 1500, 1460, 1430, 1400, 1380, 1360, 1330, 1310, 1290, 1270, 1250, 1230, 1220, 1200, 1190, 1170,
- 1160, 1150, 1140, 1130, 1110, 1100, 1090, 1080, 1070, 1060, 1050, 1040, 1030, 1020, 1010, 1000,
- 994, 988, 982, 974, 968, 960, 954, 946, 940, 932, 926, 918, 912, 906, 900, 894,
- 890, 884, 878, 874, 868, 864, 858, 854, 848, 844, 838, 832, 828, 822, 816, 812,
- 808, 802, 798, 794, 790, 786, 782, 780, 776, 772, 768, 764, 762, 758, 754, 750,
- 748, 744, 740, 736, 732, 730, 726, 722, 718, 716, 712, 708, 704,*/ 700, 696, 694,
- 690, 688, 684, 682, 678, 674, 672, 668, 666, 662, 660, 656, 654, 650, 648, 644,
- 642, 640, 638, 634, 632, 630, 628, 624, 622, 620, 616, 614, 612, 610, 608, 604,
- 602, 600, 598, 596, 592, 590, 588, 586, 584, 582, 580, 578, 576, 574, 572, 570,
- 568, 564, 562, 560, 558, 556, 554, 552, 550, 548, 546, 544, 542, 540, 538, 536,
- 534, 532, 530, 528, 526, 524, 522, 520, 518, 516, 514, 512, 510, 508, 508, 506,
- 504, 502, 500, 498, 496, 494, 494, 492, 490, 488, 486, 486, 484, 482, 480, 478,
- 476, 476, 474, 472, 470, 468, 468, 466, 464, 462, 460, 458, 458, 456, 454, 452,
- 450, 448, 448, 446, 444, 442, 442, 440, 438, 436, 436, 434, 432, 432, 430, 428,
- 426, 426, 424, 422, 420, 420, 418, 416, 416, 414, 412, 410, 408, 408, 406, 404,
- 404, 402, 400, 398, 398, 396, 394, 394, 392, 390, 390, 388, 386, 386, 384, 382,
- 382, 380, 378, 378, 376, 374, 374, 372, 370, 370, 368, 366, 366, 364, 362, 362,
- 360, 358, 358, 356, 354, 354, 352, 350, 350, 348, 348, 346, 344, 344, 342, 340,
- 340, 338, 338, 336, 334, 334, 332, 332, 330, 328, 328, 326, 326, 324, 322, 322,
- 320, 320, 318, 316, 316, 314, 314, 312, 310, 310, 308, 308, 306, 304, 304, 302,
- 300, 300, 298, 298, 296, 296, 294, 292, 292, 290, 290, 288, 286, 286, 284, 284,
- 282, 282, 280, 280, 278, 278, 276, 274, 274, 272, 272, 270, 270, 268, 268, 266,
- 264, 264, 262, 262, 260, 260, 258, 258, 256, 254, 254, 252, 252, 250, 250, 248,
- 248, 246, 244, 244, 242, 240, 240, 240, 238, 238, 236, 236, 234, 234, 232, 230,
- 230, 228, 228, 226, 226, 224, 224, 222, 220, 220, 218, 218, 216, 216, 214, 214,
- 212, 212, 210, 210, 208, 208, 206, 204, 204, 202, 202, 200, 200, 198, 198, 196,
- 196, 194, 194, 192, 190, 190, 188, 188, 186, 186, 184, 184, 182, 182, 180, 180,
- 178, 178, 176, 176, 174, 174, 172, 172, 170, 170, 168, 168, 166, 166, 164, 164,
- 162, 162, 160, 160, 158, 156, 156, 154, 154, 152, 152, 150, 150, 148, 148, 146,
- 146, 144, 144, 142, 142, 140, 140, 138, 136, 136, 136, 134, 134, 132, 130, 130,
- 128, 128, 126, 126, 124, 124, 122, 122, 120, 120, 118, 118, 116, 116, 114, 114,
- 112, 110, 110, 108, 108, 106, 106, 104, 104, 102, 102, 100, 100, 98, 98, 96,
- 94, 94, 92, 92, 90, 90, 88, 88, 86, 86, 84, 82, 82, 80, 80, 78,
- 78, 76, 76, 74, 74, 72, 72, 70, 70, 68, 68, 66, 66, 64, 62, 62,
- 60, 60, 58, 56, 56, 54, 54, 52, 52, 50, 50, 48, 48, 46, 46, 44,
- 44, 42, 40, 40, 38, 38, 36, 34, 34, 32, 32, 30, 30, 28, 28, 26,
- 24, 24, 22, 22, 20, 20, 18, 16, 16, 14, 14, 12, 12, 10, 10, 8,
- 6, 6, 4, 2, 2, 0, 0, -2, -4, -4, -6, -6, -8, -10, -10, -12,
- -12, -14, -16, - 16, -18, -20, -20, -22, -22, -24, -26, -26, -28, -30, -30, -32,
- -34, -34, -36, -36, -38, -40, -40, -42, -42, -44, -46, -46, -48, -50, -50, -52,
- -54, -54, -56, -58, -58, -60, -60, -62, -64, -66, -66, -68, -70, -70, -72, -74,
- -76, -76, -78, -80, -80, -82, -84, -86, -86, -88, -90, -90, -92, -94, -94, -96,
- -98, -98, -100, -102, -104, -106, -106, -108, -110, -112, -114, -114, -116, -118, -120, -120,
- -122, -124, -126, -128, -130, -130, -132, -134, -136, -138, -140, -142, -144, -146, -146, -148,
- -150, -152, -154, -156, -158, -160, -162, -164, -166, -166, -168, -170, -172, -174, -176, -178,
- -180, -182, -184, -186, -188, -190, -192, -194, -196, -196, -198, -200/*,-202, -204, -206, -208,
- -210, -212, -214, -216, -218, -220, -224, -226, -228, -230, -232, -234, -236, -238, -242, -246,
- -248, -250, -254, -256, -260, -262, -264, -268, -270, -274, -276, -278, -282, -284, -286, -290,
- -292, -296, -298, -300, -306, -308, -312, -316, -320, -324, -326, -330, -334, -338, -342, -344,
- -348, -354, -358, -362, -366, -370, -376, -380, -384, -388, -394, -398, -404, -410, -416, -420,
- -428, -432, -440, -446, -450, -460, -468, -476, -484, -492, -500, -510, -524, -534, -546, -560,
- -572, -588, -600, -630, -656, -684, -720, -770 */
-};
-
static IOMAPINPUT IOMapInput;
static VARSINPUT VarsInput;
@@ -151,6 +94,7 @@ void cInputSetupCustomSensor(UBYTE Port);
void cInputCalcSensorValues(UBYTE No);
UBYTE cInputInitColorSensor(UBYTE Port, UBYTE *pInitStatus);
void cInputCalibrateColor(COLORSTRUCT *pC, UWORD *pNewVals);
+SWORD cInputTempConv(UWORD InputVal);
UBYTE cInputPinFunc(UBYTE Cmd, UBYTE Port, UBYTE Pin, UBYTE *pData);
void cInputInit(void* pHeader)
@@ -268,12 +212,9 @@ void cInputCtrl(void)
/* A type change has been carried out earlier - waiting for valid data */
/* The color sensor requires special startup sequence with communication */
- if ((sType == COLORFULL) ||
- (sType == COLORRED) ||
- (sType == COLORGREEN)||
- (sType == COLORBLUE) ||
- (sType == COLOREXIT) ||
- (sType == COLORNONE))
+ if ((sType == COLORFULL) || (sType == COLORRED) ||
+ (sType == COLORGREEN)|| (sType == COLORBLUE) ||
+ (sType == COLOREXIT) || (sType == COLORNONE))
{
cInputCalcSensorValues(Tmp);
}
@@ -328,7 +269,7 @@ void cInputCalcSensorValues(UBYTE No)
dInputRead0(No, &(pIn->DigiPinsIn));
dInputRead1(No, &(pIn->DigiPinsIn));
}
-
+
dInputGetRawAd(&InputVal, No);
pIn->ADRaw = InputVal;
@@ -342,7 +283,7 @@ void cInputCalcSensorValues(UBYTE No)
InputVal = 290;
else if (InputVal > 928)
InputVal = 928;
- InputVal = TempConvTable[(InputVal) - /*197*/ 290];
+ InputVal = cInputTempConv(InputVal - 290);
InputVal = InputVal + 200;
InputVal = (UWORD)(((SLONG)InputVal * (SLONG)1023)/(SLONG)900);
}
@@ -1173,6 +1114,22 @@ void cInputSetupCustomSensor(UBYTE Port)
}
+SWORD cInputTempConv(UWORD InputVal)
+{
+ static const long long TempCoeff[] = { -5425ll, 9261399ll, -6686663252ll,
+ 2573629857807ll, -822478326197838ll, 195856762719738784ll };
+ const unsigned int TempCoeffShift = 48;
+ /* Replace the original table with polynomial. */
+ int i;
+ long long Input = InputVal;
+ long long Output = TempCoeff[0];
+ for (i = 1; i < sizeof TempCoeff / sizeof TempCoeff[0]; i++)
+ Output = Output * Input + TempCoeff[i];
+ /* Round. */
+ return Output + (1ll << TempCoeffShift - 1) >> TempCoeffShift;
+}
+
+
UBYTE cInputInitColorSensor(UBYTE Port, UBYTE *pInitStatus)
{
diff --git a/AT91SAM7S256/Source/c_output.c b/AT91SAM7S256/Source/c_output.c
index cd826ca..30058b4 100644
--- a/AT91SAM7S256/Source/c_output.c
+++ b/AT91SAM7S256/Source/c_output.c
@@ -73,72 +73,72 @@ void cOutputCtrl(void)
{
OUTPUT * pOut = &(IOMapOutput.Outputs[Tmp]);
if (pOut->Flags != 0)
- {
- if (pOut->Flags & UPDATE_RESET_ROTATION_COUNT)
+ {
+ if (pOut->Flags & UPDATE_RESET_ROTATION_COUNT)
{
pOut->Flags &= ~UPDATE_RESET_ROTATION_COUNT;
dOutputResetRotationCaptureCount(Tmp);
}
if (pOut->Flags & UPDATE_RESET_COUNT)
- {
- pOut->Flags &= ~UPDATE_RESET_COUNT;
- dOutputResetTachoLimit(Tmp);
- }
+ {
+ pOut->Flags &= ~UPDATE_RESET_COUNT;
+ dOutputResetTachoLimit(Tmp);
+ }
if (pOut->Flags & UPDATE_RESET_BLOCK_COUNT)
{
pOut->Flags &= ~UPDATE_RESET_BLOCK_COUNT;
- dOutputResetBlockTachoLimit(Tmp);
+ dOutputResetBlockTachoLimit(Tmp);
}
if (pOut->Flags & UPDATE_SPEED)
- {
- pOut->Flags &= ~UPDATE_SPEED;
- if (pOut->Mode & MOTORON)
- {
- dOutputSetSpeed (Tmp, pOut->RunState, pOut->Speed, pOut->SyncTurnParameter);
- }
- }
- if (pOut->Flags & UPDATE_MODE)
- {
+ {
+ pOut->Flags &= ~UPDATE_SPEED;
+ if (pOut->Mode & MOTORON)
+ {
+ dOutputSetSpeed(Tmp, pOut->RunState, pOut->Speed, pOut->SyncTurnParameter);
+ }
+ }
+ if (pOut->Flags & UPDATE_MODE)
+ {
pOut->Flags &= ~UPDATE_MODE;
- if (pOut->Mode & BRAKE)
+ if (pOut->Mode & BRAKE)
{
// Motor is Braked
dOutputSetMode(Tmp, BRAKE);
- }
+ }
else
{
// Motor is floated
dOutputSetMode(Tmp, 0x00);
}
- if (pOut->Mode & MOTORON)
- {
- if (pOut->Mode & REGULATED)
- {
- dOutputEnableRegulation(Tmp, pOut->RegMode);
- }
- else
- {
- dOutputDisableRegulation(Tmp);
- }
- }
- else
- {
- dOutputSetSpeed(Tmp, 0x00, 0x00, 0x00);
- dOutputDisableRegulation(Tmp);
- }
- }
+ if (pOut->Mode & MOTORON)
+ {
+ if (pOut->Mode & REGULATED)
+ {
+ dOutputEnableRegulation(Tmp, pOut->RegMode);
+ }
+ else
+ {
+ dOutputDisableRegulation(Tmp);
+ }
+ }
+ else
+ {
+ dOutputSetSpeed(Tmp, 0x00, 0x00, 0x00);
+ dOutputDisableRegulation(Tmp);
+ }
+ }
if (pOut->Flags & UPDATE_TACHO_LIMIT)
- {
- pOut->Flags &= ~UPDATE_TACHO_LIMIT;
- dOutputSetTachoLimit(Tmp, pOut->TachoLimit, pOut->Options);
- }
+ {
+ pOut->Flags &= ~UPDATE_TACHO_LIMIT;
+ dOutputSetTachoLimit(Tmp, pOut->TachoLimit, pOut->Options);
+ }
if (pOut->Flags & UPDATE_PID_VALUES)
- {
- pOut->Flags &= ~UPDATE_PID_VALUES;
- dOutputSetPIDParameters(Tmp, pOut->RegPParameter, pOut->RegIParameter, pOut->RegDParameter);
- dOutputSetMax(Tmp, pOut->MaxSpeed, pOut->MaxAcceleration);
- }
- }
+ {
+ pOut->Flags &= ~UPDATE_PID_VALUES;
+ dOutputSetPIDParameters(Tmp, pOut->RegPParameter, pOut->RegIParameter, pOut->RegDParameter);
+ dOutputSetMax(Tmp, pOut->MaxSpeed, pOut->MaxAcceleration);
+ }
+ }
}
dOutputSetRegulationTime(IOMapOutput.RegulationTime);
dOutputSetRegulationOptions(IOMapOutput.RegulationOptions);
@@ -161,11 +161,11 @@ void cOutputUpdateIomap(void)
for(Tmp = 0; Tmp < NO_OF_OUTPUTS; Tmp++)
{
- OUTPUT * pOut = &(IOMapOutput.Outputs[Tmp]);
- pOut->ActualSpeed = TempCurrentMotorSpeed[Tmp];
+ OUTPUT * pOut = &(IOMapOutput.Outputs[Tmp]);
+ pOut->ActualSpeed = TempCurrentMotorSpeed[Tmp];
pOut->TachoCnt = TempTachoCount[Tmp];
pOut->BlockTachoCount = TempBlockTachoCount[Tmp];
- pOut->RotationCount = TempRotationCount[Tmp];
+ pOut->RotationCount = TempRotationCount[Tmp];
pOut->Overloaded = TempMotorOverloaded[Tmp];
if (!(pOut->Flags & PENDING_UPDATES))
{
diff --git a/AT91SAM7S256/Source/c_ui.c b/AT91SAM7S256/Source/c_ui.c
index 09d35fe..ac6b499 100644
--- a/AT91SAM7S256/Source/c_ui.c
+++ b/AT91SAM7S256/Source/c_ui.c
@@ -93,22 +93,22 @@ const HEADER cUi =
const BMPMAP *Intro[NO_OF_INTROBITMAPS] = // Picture sequence for the intro animation
{
- (BMPMAP*)RCXintro_1,
- (BMPMAP*)RCXintro_2,
- (BMPMAP*)RCXintro_3,
- (BMPMAP*)RCXintro_4,
- (BMPMAP*)RCXintro_5,
- (BMPMAP*)RCXintro_6,
- (BMPMAP*)RCXintro_7,
- (BMPMAP*)RCXintro_8,
- (BMPMAP*)RCXintro_9,
- (BMPMAP*)RCXintro_10,
- (BMPMAP*)RCXintro_11,
- (BMPMAP*)RCXintro_12,
- (BMPMAP*)RCXintro_13,
- (BMPMAP*)RCXintro_14,
- (BMPMAP*)RCXintro_15,
- (BMPMAP*)RCXintro_16
+ (BMPMAP*) POINTER_TO_DATA (RCXintro_1),
+ (BMPMAP*) POINTER_TO_DATA (RCXintro_2),
+ (BMPMAP*) POINTER_TO_DATA (RCXintro_3),
+ (BMPMAP*) POINTER_TO_DATA (RCXintro_4),
+ (BMPMAP*) POINTER_TO_DATA (RCXintro_5),
+ (BMPMAP*) POINTER_TO_DATA (RCXintro_6),
+ (BMPMAP*) POINTER_TO_DATA (RCXintro_7),
+ (BMPMAP*) POINTER_TO_DATA (RCXintro_8),
+ (BMPMAP*) POINTER_TO_DATA (RCXintro_9),
+ (BMPMAP*) POINTER_TO_DATA (RCXintro_10),
+ (BMPMAP*) POINTER_TO_DATA (RCXintro_11),
+ (BMPMAP*) POINTER_TO_DATA (RCXintro_12),
+ (BMPMAP*) POINTER_TO_DATA (RCXintro_13),
+ (BMPMAP*) POINTER_TO_DATA (RCXintro_14),
+ (BMPMAP*) POINTER_TO_DATA (RCXintro_15),
+ (BMPMAP*) POINTER_TO_DATA (RCXintro_16)
};
#endif
@@ -1313,7 +1313,7 @@ void cUiCtrl(void)
VarsUi.State = 0;
VarsUi.Pointer = 0;
- VarsUi.Timer = -INTRO_START_TIME;
+ VarsUi.Timer = CONFIG_INTRO ? -INTRO_START_TIME : 0;
VarsUi.FNOFState = 0;
VarsUi.FBState = 0;
@@ -1325,11 +1325,11 @@ void cUiCtrl(void)
VarsUi.GUSState = 0;
IOMapUi.pMenu = (MENU*)cUiGetMenuPointer(0);
- IOMapUi.State = INIT_INTRO;
+ IOMapUi.State = CONFIG_INTRO ? INIT_INTRO : INIT_WAIT;
pMapDisplay->EraseMask = SCREEN_BIT(SCREEN_BACKGROUND);
#ifndef STRIPPED
- pMapDisplay->pBitmaps[BITMAP_1] = (BMPMAP*)Intro[VarsUi.Pointer];
+ pMapDisplay->pBitmaps[BITMAP_1] = CONFIG_INTRO ? (BMPMAP*)Intro[VarsUi.Pointer] : RCXintro_16;
#endif
pMapDisplay->UpdateMask = BITMAP_BIT(BITMAP_1);
pMapDisplay->Flags |= DISPLAY_ON;
@@ -1340,6 +1340,7 @@ void cUiCtrl(void)
}
break;
+#if CONFIG_INTRO
case INIT_LOW_BATTERY :
{
if (++VarsUi.Timer >= (INTRO_LOWBATT_TIME))
@@ -1440,6 +1441,8 @@ void cUiCtrl(void)
}
}
break;
+#endif /* CONFIG_INTRO */
+
#ifndef STRIPPED
case INIT_WAIT :
{
diff --git a/AT91SAM7S256/Source/c_ui.h b/AT91SAM7S256/Source/c_ui.h
index e55e4eb..71d0e18 100644
--- a/AT91SAM7S256/Source/c_ui.h
+++ b/AT91SAM7S256/Source/c_ui.h
@@ -40,7 +40,7 @@
#define CHECKBYTE 0x78 // Used to validate NVData
-#define BATTERY_COUNT_TO_MV (float)13.848 // Battery count to mV factor [mV/cnt]
+#define BATTERY_COUNT_TO_MV 13.848f // Battery count to mV factor [mV/cnt]
#define LOW_BATT_THRESHOLD 6 // Low batt conunts before warning
#define BUTTON_DELAY_TIME 800 // Delay before first repeat [mS]
diff --git a/AT91SAM7S256/Source/config.h b/AT91SAM7S256/Source/config.h
new file mode 100644
index 0000000..d396771
--- /dev/null
+++ b/AT91SAM7S256/Source/config.h
@@ -0,0 +1,10 @@
+#ifndef CONFIG_H
+#define CONFIG_H
+/*
+ * This file defines compilation options.
+ */
+
+/* Include intro code and images. */
+#define CONFIG_INTRO 1
+
+#endif /* CONFIG_H */
diff --git a/AT91SAM7S256/Source/d_loader.h b/AT91SAM7S256/Source/d_loader.h
index 4aaf140..95bcb9d 100644
--- a/AT91SAM7S256/Source/d_loader.h
+++ b/AT91SAM7S256/Source/d_loader.h
@@ -18,11 +18,18 @@
#define FILETABLE_SIZE ((2 * SECTORSIZE)/4)
#define STARTOFFILETABLE (0x140000L - (FILETABLE_SIZE*4))
#define FILEPTRTABLE ((const ULONG*)(0x140000L - (FILETABLE_SIZE*4)))
+#ifndef STARTOFUSERFLASH_FROM_LINKER
#ifndef STRIPPED
#define STARTOFUSERFLASH (0x126400L)//(0x124600L) 1.31 == (0x122100L)
#else
#define STARTOFUSERFLASH (0x122C00L)//(0x124600L) 1.31 == (0x122100L)
#endif
+#define SIZEOFUSERFLASH_MAX SIZEOFUSERFLASH
+#else
+extern char __STARTOFUSERFLASH_FROM_LINKER;
+#define STARTOFUSERFLASH ((ULONG) &__STARTOFUSERFLASH_FROM_LINKER)
+#define SIZEOFUSERFLASH_MAX ((ULONG) (128 * 1024))
+#endif
#define SIZEOFUSERFLASH ((ULONG)STARTOFFILETABLE - STARTOFUSERFLASH)
#define SIZEOFFLASH 262144L
@@ -79,7 +86,7 @@ typedef struct
ULONG DataSize;
UWORD CheckSum;
UWORD FileType;
- UWORD FileSectorTable[(SIZEOFUSERFLASH/SECTORSIZE)];
+ UWORD FileSectorTable[(SIZEOFUSERFLASH_MAX/SECTORSIZE)];
}FILEHEADER;
void dLoaderInit(void);
diff --git a/AT91SAM7S256/Source/d_lowspeed.r b/AT91SAM7S256/Source/d_lowspeed.r
index b82a208..5abeb9d 100644
--- a/AT91SAM7S256/Source/d_lowspeed.r
+++ b/AT91SAM7S256/Source/d_lowspeed.r
@@ -56,12 +56,10 @@ typedef struct
static LOWSPEEDPARAMETERS LowSpeedData[4];
+__ramdata
ULONG DATA_PINS[4] = {CHANNEL_ONE_DATA, CHANNEL_TWO_DATA, CHANNEL_THREE_DATA, CHANNEL_FOUR_DATA};
+__ramdata
ULONG CLK_PINS[4] = {CHANNEL_ONE_CLK, CHANNEL_TWO_CLK, CHANNEL_THREE_CLK, CHANNEL_FOUR_CLK};
-const ULONG CLK_OR_DATA_PINS[4] = {CHANNEL_ONE_CLK | CHANNEL_ONE_DATA,
- CHANNEL_TWO_CLK | CHANNEL_TWO_DATA,
- CHANNEL_THREE_CLK | CHANNEL_THREE_DATA,
- CHANNEL_FOUR_CLK | CHANNEL_FOUR_DATA};
#define LOWSPEED_CHANNEL1 0
#define LOWSPEED_CHANNEL2 1
@@ -145,120 +143,15 @@ const ULONG CLK_OR_DATA_PINS[4] = {CHANNEL_ONE_CLK | CHANNEL_ONE_DATA,
#define SETDebugOutputLow *AT91C_PIOA_CODR = 0x20000000
-#define SETClkComOneHigh *AT91C_PIOA_SODR = CHANNEL_ONE_CLK
-
-#define SETClkComOneLow *AT91C_PIOA_CODR = CHANNEL_ONE_CLK
-
-#define GetClkComOnePinLevel *AT91C_PIOA_PDSR & CHANNEL_ONE_CLK
-
-#define SETClkComTwoHigh *AT91C_PIOA_SODR = CHANNEL_TWO_CLK
-
-#define SETClkComTwoLow *AT91C_PIOA_CODR = CHANNEL_TWO_CLK
-
-#define GetClkComTwoPinLevel *AT91C_PIOA_PDSR & CHANNEL_TWO_CLK
-
-#define SETClkComThreeHigh *AT91C_PIOA_SODR = CHANNEL_THREE_CLK
-
-#define SETClkComThreeLow *AT91C_PIOA_CODR = CHANNEL_THREE_CLK
-
-#define GetClkComThreePinLevel *AT91C_PIOA_PDSR & CHANNEL_THREE_CLK
-
-#define SETClkComFourHigh *AT91C_PIOA_SODR = CHANNEL_FOUR_CLK
-
-#define SETClkComFourLow *AT91C_PIOA_CODR = CHANNEL_FOUR_CLK
-
-#define GetClkComFourPinLevel *AT91C_PIOA_PDSR & CHANNEL_FOUR_CLK
-
-
-#define SETDataComOneHigh *AT91C_PIOA_SODR = CHANNEL_ONE_DATA
-
-#define SETDataComOneLow *AT91C_PIOA_CODR = CHANNEL_ONE_DATA
-
-#define GetDataComOnePinLevel *AT91C_PIOA_PDSR & CHANNEL_ONE_DATA
-
-#define GETDataComOnePinDirection *AT91C_PIOA_OSR & CHANNEL_ONE_DATA
-
-#define SETDataComTwoHigh *AT91C_PIOA_SODR = CHANNEL_TWO_DATA
-
-#define SETDataComTwoLow *AT91C_PIOA_CODR = CHANNEL_TWO_DATA
-
-#define GetDataComTwoPinLevel *AT91C_PIOA_PDSR & CHANNEL_TWO_DATA
-
-#define GETDataComTwoPinDirection *AT91C_PIOA_OSR & CHANNEL_TWO_DATA
-
-#define SETDataComThreeHigh *AT91C_PIOA_SODR = CHANNEL_THREE_DATA
-
-#define SETDataComThreeLow *AT91C_PIOA_CODR = CHANNEL_THREE_DATA
-
-#define GetDataComThreePinLevel *AT91C_PIOA_PDSR & CHANNEL_THREE_DATA
-
-#define GETDataComThreePinDirection *AT91C_PIOA_OSR & CHANNEL_THREE_DATA
-
-#define SETDataComFourHigh *AT91C_PIOA_SODR = CHANNEL_FOUR_DATA
-
-#define SETDataComFourLow *AT91C_PIOA_CODR = CHANNEL_FOUR_DATA
-
-#define GetDataComFourPinLevel *AT91C_PIOA_PDSR & CHANNEL_FOUR_DATA
-
-#define GETDataComFourPinDirection *AT91C_PIOA_OSR & CHANNEL_FOUR_DATA
-
-#define SETDataComOneToInput *AT91C_PIOA_ODR = CHANNEL_ONE_DATA;
-
-#define SETDataComOneToOutput *AT91C_PIOA_OER = CHANNEL_ONE_DATA;
-
-#define SETDataComTwoToInput *AT91C_PIOA_ODR = CHANNEL_TWO_DATA;
-
-#define SETDataComTwoToOutput *AT91C_PIOA_OER = CHANNEL_TWO_DATA;
-
-#define SETDataComThreeToInput *AT91C_PIOA_ODR = CHANNEL_THREE_DATA;
-
-#define SETDataComThreeToOutput *AT91C_PIOA_OER = CHANNEL_THREE_DATA;
-
-#define SETDataComFourToInput *AT91C_PIOA_ODR = CHANNEL_FOUR_DATA;
-
-#define SETDataComFourToOutput *AT91C_PIOA_OER = CHANNEL_FOUR_DATA;
-
-#define DISABLEPullupDataComOne *AT91C_PIOA_PPUDR = CHANNEL_ONE_DATA;
-
-#define DISABLEPullupClkComOne *AT91C_PIOA_PPUDR = CHANNEL_ONE_CLK;
-
-#define DISABLEPullupDataComTwo *AT91C_PIOA_PPUDR = CHANNEL_TWO_DATA;
-
-#define DISABLEPullupClkComTwo *AT91C_PIOA_PPUDR = CHANNEL_TWO_CLK;
-
-#define DISABLEPullupDataComThree *AT91C_PIOA_PPUDR = CHANNEL_THREE_DATA;
-
-#define DISABLEPullupClkComThree *AT91C_PIOA_PPUDR = CHANNEL_THREE_CLK;
-
-#define DISABLEPullupDataComFour *AT91C_PIOA_PPUDR = CHANNEL_FOUR_DATA;
-
-#define DISABLEPullupClkComFour *AT91C_PIOA_PPUDR = CHANNEL_FOUR_CLK;
-
-#define ENABLEPullupDataComOne *AT91C_PIOA_PPUER = CHANNEL_ONE_DATA;
-
-#define ENABLEPullupClkComOne *AT91C_PIOA_PPUER = CHANNEL_ONE_CLK;
-
-#define ENABLEPullupDataComTwo *AT91C_PIOA_PPUER = CHANNEL_TWO_DATA;
-
-#define ENABLEPullupClkComTwo *AT91C_PIOA_PPUER = CHANNEL_TWO_CLK;
-
-#define ENABLEPullupDataComThree *AT91C_PIOA_PPUER = CHANNEL_THREE_DATA;
-
-#define ENABLEPullupClkComThree *AT91C_PIOA_PPUER = CHANNEL_THREE_CLK;
-
-#define ENABLEPullupDataComFour *AT91C_PIOA_PPUER = CHANNEL_FOUR_DATA;
-
-#define ENABLEPullupClkComFour *AT91C_PIOA_PPUER = CHANNEL_FOUR_CLK;
-
#define SETClkLow(ChannelNr) {\
- *AT91C_PIOA_CODR = CLK_PINS[ChannelNr];\
+ *AT91C_PIOA_CODR = CLK_PINS[ChannelNr];\
LowSpeedData[ChannelNr].ClkStatus = 0;\
- }
+}
#define SETClkHigh(ChannelNr) {\
*AT91C_PIOA_SODR = CLK_PINS[ChannelNr];\
LowSpeedData[ChannelNr].ClkStatus = 1;\
- }
+}
#define SETDataLow(ChannelNr) {\
*AT91C_PIOA_CODR = DATA_PINS[ChannelNr];\
@@ -272,13 +165,13 @@ const ULONG CLK_OR_DATA_PINS[4] = {CHANNEL_ONE_CLK | CHANNEL_ONE_DATA,
*AT91C_PIOA_ODR = DATA_PINS[ChannelNr];\
}
+
#define SETDataToOutput(ChannelNr) {\
*AT91C_PIOA_OER = DATA_PINS[ChannelNr];\
}
-#define GetClkPinLevel(ChannelNr) (*AT91C_PIOA_PDSR & CLK_PINS[ChannelNr])
+#define GetClkPinLevel(ChannelNr) (*AT91C_PIOA_PDSR & CLK_PINS[ChannelNr])
#define GetDataPinLevel(ChannelNr) (*AT91C_PIOA_PDSR & DATA_PINS[ChannelNr])
-#define GETDataPinDirection(ChannelNr) (*AT91C_PIOA_OSR & DATA_PINS[ChannelNr])
#define ENABLEPWMTimerForLowCom {\
*AT91C_PWMC_ENA = AT91C_PWMC_CHID0; /* Enable PWM output channel 0 */\
@@ -606,19 +499,20 @@ __ramfunc void LowSpeedPwmIrqHandler(void)
}
}
-
#define ENABLETxPins(ChannelNumber) {\
- *AT91C_PIOA_PER = CLK_OR_DATA_PINS[ChannelNumber]; /* Enable PIO on PA20 & PA28 */\
- *AT91C_PIOA_PPUDR = CLK_OR_DATA_PINS[ChannelNumber]; /* Disable Pull-up resistor */\
- *AT91C_PIOA_ODR = CLK_OR_DATA_PINS[ChannelNumber]; /* PA20 & PA28 set to Input */\
+ ULONG Tmp = CLK_PINS[ChannelNumber] | DATA_PINS[ChannelNumber];\
+ *AT91C_PIOA_PER = Tmp; /* Enable PIO */\
+ *AT91C_PIOA_PPUDR = Tmp; /* Disable Pull-up resistor */\
+ *AT91C_PIOA_ODR = Tmp; /* PIO set to Input */\
}
#define TxData(ChannelNumber, Status, DataOutBuffer, NumberOfByte) {\
if ((GetDataPinLevel(ChannelNumber) && GetClkPinLevel(ChannelNumber)) && (LowSpeedData[ChannelNumber].ChannelState == LOWSPEED_IDLE))\
{\
- *AT91C_PIOA_PER = CLK_OR_DATA_PINS[ChannelNumber]; /* Enable PIO on PA20 & PA28 */\
- *AT91C_PIOA_OER = CLK_OR_DATA_PINS[ChannelNumber]; /* PA20 & PA28 set to Output */\
- *AT91C_PIOA_PPUDR = CLK_OR_DATA_PINS[ChannelNumber]; /* Disable Pull-up resistor */\
+ ULONG Tmp = CLK_PINS[ChannelNumber] | DATA_PINS[ChannelNumber];\
+ *AT91C_PIOA_PER = Tmp; /* Enable PIO */\
+ *AT91C_PIOA_OER = Tmp; /* POI set to Output */\
+ *AT91C_PIOA_PPUDR = Tmp; /* Disable Pull-up resistor */\
SETClkHigh(ChannelNumber);\
SETDataLow(ChannelNumber);\
LowSpeedData[ChannelNumber].ClkStatus = 1;\
@@ -823,7 +717,7 @@ SBYTE rI2CFastStart(UBYTE port, UBYTE address, UBYTE *write_data, UBYTE write_le
{
p_scl_pin = CLK_PINS[port];
p_sda_pin = DATA_PINS[port];
- pinmask = CLK_OR_DATA_PINS[port];
+ pinmask = p_scl_pin | p_sda_pin;
p_state = I2C_IDLE;
// Set data & clock to be enabled for output with
// pullups disabled.
diff --git a/AT91SAM7S256/Source/d_output.c b/AT91SAM7S256/Source/d_output.c
index 3e9e1cd..46c6441 100644
--- a/AT91SAM7S256/Source/d_output.c
+++ b/AT91SAM7S256/Source/d_output.c
@@ -28,7 +28,6 @@
#define MAX_COUNT_TO_RUN 10000000
#define REG_MAX_VALUE 100
-#define REG_MIN_VALUE -100
#define RAMP_TIME_INTERVAL 25 // Measured in 1 mS => 25 mS interval
@@ -127,8 +126,6 @@ void dOutputInit(void)
ENABLECaptureMotorA;
ENABLECaptureMotorB;
ENABLECaptureMotorC;
-
- RegulationTime = REGULATION_TIME;
for (Temp = 0; Temp < 3; Temp++)
{
@@ -149,7 +146,7 @@ void dOutputInit(void)
pMD->RegDParameter = DEFAULT_D_GAIN_FACTOR;
pMD->MotorMaxSpeed = DEFAULT_MAX_SPEED;
pMD->MotorMaxAcceleration = DEFAULT_MAX_ACCELERATION;
- pMD->RegulationMode = 0;
+ pMD->RegulationMode = 0;
pMD->MotorOverloaded = 0;
pMD->RunStateAtLimit = MOTOR_RUN_STATE_IDLE;
pMD->RampDownToLimit = 0;
@@ -205,6 +202,7 @@ void dOutputCtrl(void)
pMD->RegulationTimeCount = 0;
pMD->DeltaCaptureCount = 0;
pMD->MotorRunState = MOTOR_RUN_STATE_RUNNING;
+
}
if (pMD->RegulationTimeCount > RegulationTime)
{
@@ -233,17 +231,17 @@ void dOutputGetMotorParameters(UBYTE *CurrentMotorSpeed, SLONG *TachoCount, SLON
{
MOTORDATA * pMD = &(MotorData[Tmp]);
CurrentMotorSpeed[Tmp] = pMD->MotorActualSpeed;
- TachoCount[Tmp] = pMD->CurrentCaptureCount;
- BlockTachoCount[Tmp] = pMD->MotorBlockTachoCount;
- RotationCount[Tmp] = pMD->RotationCaptureCount;
- RunState[Tmp] = pMD->MotorRunState;
- MotorOverloaded[Tmp] = pMD->MotorOverloaded;
+ TachoCount[Tmp] = pMD->CurrentCaptureCount;
+ BlockTachoCount[Tmp] = pMD->MotorBlockTachoCount;
+ RotationCount[Tmp] = pMD->RotationCaptureCount;
+ RunState[Tmp] = pMD->MotorRunState;
+ MotorOverloaded[Tmp] = pMD->MotorOverloaded;
}
}
-void dOutputSetMode(UBYTE Motor, UBYTE Mode) //Set motor mode (break, Float)
+void dOutputSetMode(UBYTE MotorNr, UBYTE Mode) //Set motor mode (break, Float)
{
- INSERTMode(Motor, Mode);
+ INSERTMode(MotorNr, Mode);
}
/* Update the regulation state for the motor */
@@ -395,7 +393,7 @@ void dOutputSetTachoLimit(UBYTE MotorNr, ULONG BlockTachoCntToTravel, UBYTE Opti
void dOutputSetSpeed (UBYTE MotorNr, UBYTE NewMotorRunState, SBYTE Speed, SBYTE NewTurnParameter)
{
MOTORDATA * pMD = &(MotorData[MotorNr]);
- if ((pMD->MotorSetSpeed != Speed) || (pMD->MotorRunState != NewMotorRunState) ||
+ if ((pMD->MotorSetSpeed != Speed) || (pMD->MotorRunState != NewMotorRunState) ||
(NewMotorRunState == MOTOR_RUN_STATE_IDLE) || (pMD->TurnParameter != NewTurnParameter))
{
if (pMD->MotorTargetSpeed == 0)
@@ -827,7 +825,7 @@ void dOutputMotorIdleControl(UBYTE MotorNr)
INSERTMode(MotorNr, COAST_MOTOR_MODE);
MOTORDATA * pMD = &(MotorData[MotorNr]);
-
+
if (pMD->MotorActualSpeed != 0)
{
if (pMD->MotorActualSpeed > 0)
@@ -1086,7 +1084,7 @@ void dOutputSyncMotorPosition(UBYTE MotorOne, UBYTE MotorTwo)
if (pOne->TurnParameter != 0)
{
- if ((pOne->MotorBlockTachoCount != 0) || (pTwo->MotorBlockTachoCount))
+ if ((pOne->MotorBlockTachoCount != 0) || (pTwo->MotorBlockTachoCount != 0))
{
if (pOne->MotorTargetSpeed >= 0)
{
@@ -1139,7 +1137,7 @@ void dOutputSyncMotorPosition(UBYTE MotorOne, UBYTE MotorTwo)
CorrectionValue = (PValue + IValue + DValue) / 4;
- MotorSpeed = (SWORD)pOne->MotorTargetSpeed - CorrectionValue;
+ MotorSpeed = pOne->MotorTargetSpeed - CorrectionValue;
MotorSpeed = dOutputBound (MotorSpeed, MAXIMUM_SPEED_FW);
if (pOne->TurnParameter != 0)
@@ -1155,7 +1153,7 @@ void dOutputSyncMotorPosition(UBYTE MotorOne, UBYTE MotorTwo)
}
pOne->MotorActualSpeed = (SBYTE)MotorSpeed;
- MotorSpeed = (SWORD)pTwo->MotorTargetSpeed + CorrectionValue;
+ MotorSpeed = pTwo->MotorTargetSpeed + CorrectionValue;
MotorSpeed = dOutputBound (MotorSpeed, MAXIMUM_SPEED_FW);
if (pOne->TurnParameter != 0)
@@ -1190,14 +1188,14 @@ void dOutputMotorReachedTachoLimit(UBYTE MotorNr)
break;
}
}
- pOne->MotorSetSpeed = 0;
+ pOne->MotorSetSpeed = 0;
pOne->MotorTargetSpeed = 0;
pOne->MotorActualSpeed = 0;
pOne->MotorRunState = dOutputRunStateAtLimit(pOne);
pOne->RegulationMode = dOutputRegModeAtLimit(pOne);
if (MotorTwo != 0xFF) {
MOTORDATA * pTwo = &(MotorData[MotorTwo]);
- pTwo->MotorSetSpeed = 0;
+ pTwo->MotorSetSpeed = 0;
pTwo->MotorTargetSpeed = 0;
pTwo->MotorActualSpeed = 0;
pTwo->MotorRunState = dOutputRunStateAtLimit(pTwo);
@@ -1237,6 +1235,7 @@ void dOutputSyncTachoLimitControl(UBYTE MotorNr)
}
if (MotorTwo == 0xFF)
MotorOne = 0xFF;
+
if ((MotorOne != 0xFF) && (MotorTwo != 0xFF))
{
MOTORDATA * pOne = &(MotorData[MotorOne]);
@@ -1403,20 +1402,21 @@ void dOutputResetSyncMotors(UBYTE MotorNr)
}
if (MotorTwo == 0xFF)
MotorOne = 0xFF;
+
MOTORDATA * pMD = &(MotorData[MotorNr]);
if ((MotorOne != 0xFF) && (MotorTwo != 0xFF))
{
MOTORDATA * pTwo = &(MotorData[MotorTwo]);
- pMD->CurrentCaptureCount = 0;
- pMD->MotorTachoCountToRun = 0;
+ pMD->CurrentCaptureCount = 0;
+ pMD->MotorTachoCountToRun = 0;
pMD->MotorTachoCountTarget = 0;
- pTwo->CurrentCaptureCount = 0;
+ pTwo->CurrentCaptureCount = 0;
pTwo->MotorTachoCountToRun = 0;
pTwo->MotorTachoCountTarget = 0;
}
else
{
- pMD->CurrentCaptureCount = 0;
+ pMD->CurrentCaptureCount = 0;
pMD->MotorTachoCountToRun = 0;
pMD->MotorTachoCountTarget = 0;
}
@@ -1440,6 +1440,7 @@ void dOutputRampDownSynch(UBYTE MotorNr)
}
if (MotorTwo == 0xFF)
MotorOne = 0xFF;
+
if ((MotorOne != 0xFF) && (MotorTwo != 0xFF))
{
MOTORDATA * pOne = &(MotorData[MotorOne]);
diff --git a/AT91SAM7S256/Source/d_output.h b/AT91SAM7S256/Source/d_output.h
index 20955a6..86cbaf6 100644
--- a/AT91SAM7S256/Source/d_output.h
+++ b/AT91SAM7S256/Source/d_output.h
@@ -42,8 +42,7 @@
#define DEFAULT_MAX_SPEED 80
#define DEFAULT_MAX_ACCELERATION 20
-#define REGULATION_TIME 100 // Measured in 1 mS => 100 mS regulation interval
-//#define REGULATION_TIME 10 // Measured in 1 mS, regulation interval
+#define REGULATION_TIME 100 // Measured in 1 mS, regulation interval
//Constant reffering to RegMode parameter
#define REGSTATE_IDLE 0x00
@@ -61,6 +60,7 @@
// Constants related to Regulation Options
#define REGOPTION_NO_SATURATION 0x01 // Do not limit intermediary regulation results
+
enum
{
MOTOR_A,
@@ -81,7 +81,7 @@ void dOutputSetTachoLimit(UBYTE MotorNr, ULONG TachoCntToTravel, UBYTE Opti
void dOutputResetTachoLimit(UBYTE MotorNr);
void dOutputResetBlockTachoLimit(UBYTE MotorNr);
void dOutputResetRotationCaptureCount(UBYTE MotorNr);
-void dOutputSetPIDParameters(UBYTE MotorNr, UBYTE NewRegPParameter, UBYTE NewRegIParameter, UBYTE NewRegDParameter);
+void dOutputSetPIDParameters(UBYTE MotorNr, UBYTE NewRegPParameter, UBYTE NewRegIParameter, UBYTE NewRegDParameter);
void dOutputSetMax(UBYTE MotorNr, SBYTE NewMaxSpeed, SBYTE NewMaxAcceleration);
void dOutputSetRegulationTime(UBYTE NewRegulationTime);
void dOutputSetRegulationOptions(UBYTE NewRegulationOptions);
@@ -99,6 +99,5 @@ void dOutputMotorIdleControl(UBYTE MotorNr);
void dOutputSyncTachoLimitControl(UBYTE MotorNr);
void dOutputMotorSyncStatus(UBYTE MotorNr, UBYTE *SyncMotorOne, UBYTE *SyncMotorTwo);
void dOutputResetSyncMotors(UBYTE MotorNr);
-void dOutputUpdateRegulationTime(UBYTE rt);
#endif
diff --git a/AT91SAM7S256/Source/d_sound.r b/AT91SAM7S256/Source/d_sound.r
index 01a3353..4851253 100644
--- a/AT91SAM7S256/Source/d_sound.r
+++ b/AT91SAM7S256/Source/d_sound.r
@@ -94,6 +94,7 @@ const SAMPLEWORD TonePattern[SOUNDVOLUMESTEPS + 1][SAMPLETONENO] =
}
};
+__ramdata
UBYTE FractionPattern[SAMPLEWORDS] =
{
0x00, // 0 -> 00000000
diff --git a/AT91SAM7S256/Source/d_sound_adpcm.r b/AT91SAM7S256/Source/d_sound_adpcm.r
index 2feff3b..f04a760 100644
--- a/AT91SAM7S256/Source/d_sound_adpcm.r
+++ b/AT91SAM7S256/Source/d_sound_adpcm.r
@@ -47,12 +47,14 @@
#ifdef SAM7S256
+__ramdata
static SWORD IndexTable[16] =
{
-1, -1, -1, -1, 2, 4, 6, 8,
-1, -1, -1, -1, 2, 4, 6, 8,
};
+__ramdata
static SWORD StepsizeTable[89] =
{
7, 8, 9, 10, 11, 12, 13, 14, 16, 17,
diff --git a/AT91SAM7S256/Source/m_sched.h b/AT91SAM7S256/Source/m_sched.h
index bd05a26..b3bb27e 100644
--- a/AT91SAM7S256/Source/m_sched.h
+++ b/AT91SAM7S256/Source/m_sched.h
@@ -36,7 +36,7 @@
#define SYSFREQ 1000
-#include "..\SAM7S256\include\sam7s256.h"
+#include "../SAM7S256/Include/sam7s256.h"
#if defined (PROTOTYPE_PCB_3) || (PROTOTYPE_PCB_4)
@@ -102,7 +102,7 @@ extern IOFROMAVR IoFromAvr;
#ifdef INCLUDE_OS
-#include "..\SAM7S256\include\sam7s256.c"
+#include "../SAM7S256/Include/sam7s256.c"
IOTOAVR IoToAvr;
IOFROMAVR IoFromAvr;
diff --git a/AT91SAM7S256/Source/stdconst.h b/AT91SAM7S256/Source/stdconst.h
index fa1c59e..6c08175 100644
--- a/AT91SAM7S256/Source/stdconst.h
+++ b/AT91SAM7S256/Source/stdconst.h
@@ -20,6 +20,8 @@
#ifndef STDCONST
#define STDCONST
+#include "config.h"
+
#ifndef NULL
#define NULL ((void *)0)
#endif
@@ -44,5 +46,29 @@ typedef char* PSZ;
#define BASETYPES
+#ifdef __GNUC__
+#define DEFINE_DATA(type, name) \
+ extern const type name ## _; \
+ const type * const name = &name ## _; \
+ const type name ## _
+#define BEGIN_DATA {
+#define END_DATA }
+#define POINTER_TO_DATA(name) (&name ## _)
+#define SIZEOF_DATA(name) (sizeof_ ## name)
+#else
+#define DEFINE_DATA(type, name) \
+ const type name[]
+#define BEGIN_DATA
+#define END_DATA
+#define POINTER_TO_DATA(name) (name)
+#define SIZEOF_DATA(name) (sizeof (name))
+#endif
+
+#ifdef __GNUC__
+#define __ramfunc __attribute__ ((section (".fastrun"), optimize ("no-jump-tables")))
+#define __ramdata __attribute__ ((section (".data")))
+#else
+#define __ramdata
+#endif
#endif
diff --git a/README b/README
new file mode 100644
index 0000000..29a10ac
--- /dev/null
+++ b/README
@@ -0,0 +1,29 @@
+This is NXT Improved Firmware, an open source community driven work based on
+the original LEGO Mindstorms NXT firmware.
+
+Online resources are accessible on the NXT Improved Firmware web page,
+including documentation, building guides, and more:
+
+ http://nxt-firmware.ni.fr.eu.org/
+
+
+NXT Improved Firmware combines code covered by the LEGO Open Source License
+with code covered by various other open source licenses. Any file not covered
+by the LEGO Open Source License includes a notice in its header. All other
+source files are covered by the LEGO Open Source License. Please see the
+enclosed "LEGO Open Source License" file for more precision on this license
+conditions.
+
+LEGO(R) is a trademark of the LEGO Group of companies which does not sponsor,
+authorize or endorse NXT Improved Firmware.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.