paparazzi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[paparazzi-commits] [5926] moved arm7 directory to arch/ lpc21 and set m


From: Felix Ruess
Subject: [paparazzi-commits] [5926] moved arm7 directory to arch/ lpc21 and set most makefiles accordingly
Date: Wed, 22 Sep 2010 23:23:55 +0000

Revision: 5926
          http://svn.sv.gnu.org/viewvc/?view=rev&root=paparazzi&revision=5926
Author:   flixr
Date:     2010-09-22 23:23:55 +0000 (Wed, 22 Sep 2010)
Log Message:
-----------
moved arm7 directory to arch/lpc21 and set most makefiles accordingly

Modified Paths:
--------------
    paparazzi3/trunk/Makefile
    paparazzi3/trunk/Makefile.ac
    paparazzi3/trunk/conf/autopilot/fixedwing.makefile
    paparazzi3/trunk/conf/autopilot/mercury_csc.makefile
    paparazzi3/trunk/conf/autopilot/rotorcraft.makefile
    paparazzi3/trunk/conf/autopilot/subsystems/fixedwing/actuators_4015.makefile
    
paparazzi3/trunk/conf/autopilot/subsystems/fixedwing/actuators_direct.makefile
    paparazzi3/trunk/conf/autopilot/subsystems/fixedwing/autopilot.makefile
    
paparazzi3/trunk/conf/autopilot/subsystems/fixedwing/radio_control_ppm.makefile
    paparazzi3/trunk/conf/autopilot/subsystems/fixedwing/testing.makefile
    
paparazzi3/trunk/conf/autopilot/subsystems/lisa_passthrough/imu_b2_v1.1.makefile
    
paparazzi3/trunk/conf/autopilot/subsystems/rotorcraft/actuators_asctec.makefile
    
paparazzi3/trunk/conf/autopilot/subsystems/rotorcraft/actuators_asctec_v2.makefile
    paparazzi3/trunk/conf/autopilot/subsystems/rotorcraft/actuators_mkk.makefile
    paparazzi3/trunk/conf/autopilot/subsystems/rotorcraft/fdm_nps.makefile
    paparazzi3/trunk/conf/autopilot/subsystems/rotorcraft/gps_skytraq.makefile
    paparazzi3/trunk/conf/autopilot/subsystems/rotorcraft/gps_ublox.makefile
    paparazzi3/trunk/conf/autopilot/subsystems/rotorcraft/imu_b2_v1.1.makefile
    paparazzi3/trunk/conf/autopilot/tiny.makefile
    paparazzi3/trunk/conf/boards/booz_1.0.makefile
    paparazzi3/trunk/conf/boards/classix.makefile
    paparazzi3/trunk/conf/boards/tiny_2.11.makefile
    paparazzi3/trunk/sw/airborne/Makefile

Added Paths:
-----------
    paparazzi3/trunk/sw/airborne/arch/lpc21/
    paparazzi3/trunk/sw/airborne/arch/lpc21/ADS8344.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/ADS8344.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/LPC2129-ROM.ld
    paparazzi3/trunk/sw/airborne/arch/lpc21/LPC2148-ROM-bl.ld
    paparazzi3/trunk/sw/airborne/arch/lpc21/LPC2148-ROM.ld
    paparazzi3/trunk/sw/airborne/arch/lpc21/adc_hw.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/adc_hw.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/armVIC.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/armVIC.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/baro_MS5534A.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/baro_MS5534A.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/crt0.S
    paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/
    paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/conf/
    paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/conf/config.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/
    paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/debug.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/dir.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/disc.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/efs.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/error.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/extract.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/fat.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/file.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/fs.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/interface.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/interfaces/
    paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/interfaces/LPC2000_regs.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/interfaces/lpc2000_spi.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/interfaces/sd.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/ioman.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/ls.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/mkfs.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/partition.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/plibc.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/time.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/types.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/ui.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/src/
    paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/src/debug.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/src/dir.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/src/disc.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/src/efs.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/src/extract.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/src/fat.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/src/file.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/src/fs.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/src/interfaces/
    paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/src/interfaces/lpc2000_spi.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/src/interfaces/sd.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/src/ioman.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/src/ls.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/src/mkfs.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/src/partition.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/src/plibc.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/src/time.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/src/ui.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/gpio.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/gpio.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/gps_hw.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/i2c_hw.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/i2c_hw.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/icp_scale.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/include/
    paparazzi3/trunk/sw/airborne/arch/lpc21/include/LPC21xx.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/include/lpcADC.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/include/lpcCAN.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/include/lpcEMC.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/include/lpcGPIO.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/include/lpcI2C.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/include/lpcPIN.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/include/lpcRTC.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/include/lpcSCB.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/include/lpcSPI.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/include/lpcTMR.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/include/lpcUART.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/include/lpcVIC.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/include/lpcWD.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/include/types.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/init_hw.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/interrupt_hw.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/inttypes.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/led_hw.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/link_mcu_hw.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/lpcusb/
    paparazzi3/trunk/sw/airborne/arch/lpc21/lpcusb/CHANGELOG
    paparazzi3/trunk/sw/airborne/arch/lpc21/lpcusb/Doxyfile
    paparazzi3/trunk/sw/airborne/arch/lpc21/lpcusb/Makefile
    paparazzi3/trunk/sw/airborne/arch/lpc21/lpcusb/examples/
    paparazzi3/trunk/sw/airborne/arch/lpc21/lpcusb/examples/Makefile
    paparazzi3/trunk/sw/airborne/arch/lpc21/lpcusb/examples/armVIC.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/lpcusb/examples/armVIC.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/lpcusb/examples/blockdev.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/lpcusb/examples/blockdev_sd.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/lpcusb/examples/console.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/lpcusb/examples/console.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/lpcusb/examples/crt.s
    paparazzi3/trunk/sw/airborne/arch/lpc21/lpcusb/examples/lpc2000_spi.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/lpcusb/examples/lpc2000_spi0.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/lpcusb/examples/lpc2148-ram.ld
    paparazzi3/trunk/sw/airborne/arch/lpc21/lpcusb/examples/lpc2148-rom-hi.ld
    paparazzi3/trunk/sw/airborne/arch/lpc21/lpcusb/examples/lpc2148-rom.ld
    paparazzi3/trunk/sw/airborne/arch/lpc21/lpcusb/examples/main_msc.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/lpcusb/examples/msc_bot.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/lpcusb/examples/msc_bot.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/lpcusb/examples/msc_scsi.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/lpcusb/examples/msc_scsi.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/lpcusb/examples/printf.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/lpcusb/examples/spi.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/lpcusb/examples/startup.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/lpcusb/examples/startup.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/lpcusb/type.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/lpcusb/usbapi.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/lpcusb/usbcontrol.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/lpcusb/usbdebug.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/lpcusb/usbhw_lpc.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/lpcusb/usbhw_lpc.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/lpcusb/usbinit.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/lpcusb/usbstdreq.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/lpcusb/usbstruct.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/max11040_hw.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/max11040_hw.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/max1167_hw.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/max1167_hw.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/micromag_fw_hw.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/micromag_fw_hw.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/micromag_hw.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/micromag_hw.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/modem_hw.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/modem_hw.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/ppm_hw.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/ppm_hw.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/pwm_input.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/pwm_input.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/scp1000_hw.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/scp1000_hw.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/servos_4015_MAT_hw.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/servos_4015_MAT_hw.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/servos_4015_hw.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/servos_4015_hw.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/servos_4015_hw_new.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/servos_4017_hw.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/servos_4017_hw.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/servos_csc.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/servos_csc.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/servos_direct_hw.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/servos_direct_hw.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/servos_ppm_hw.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/servos_ppm_hw.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/spi_hw.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/spi_hw.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/ssp_hw.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/sys_time_hw.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/sys_time_hw.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/tacho_mb.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/tacho_mb.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/test/
    paparazzi3/trunk/sw/airborne/arch/lpc21/test/LPC2138-ROM-bl.ld
    paparazzi3/trunk/sw/airborne/arch/lpc21/test/LPC2138-ROM.ld
    paparazzi3/trunk/sw/airborne/arch/lpc21/test/Makefile
    paparazzi3/trunk/sw/airborne/arch/lpc21/test/bootloader/
    paparazzi3/trunk/sw/airborne/arch/lpc21/test/bootloader/Makefile
    paparazzi3/trunk/sw/airborne/arch/lpc21/test/bootloader/bootloader.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/test/bootloader/console.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/test/bootloader/console.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/test/bootloader/crt.S
    paparazzi3/trunk/sw/airborne/arch/lpc21/test/bootloader/flash.sh
    paparazzi3/trunk/sw/airborne/arch/lpc21/test/bootloader/lpc2148-ram.ld
    paparazzi3/trunk/sw/airborne/arch/lpc21/test/bootloader/lpc2148-rom-hi.ld
    paparazzi3/trunk/sw/airborne/arch/lpc21/test/bootloader/lpc2148-rom.ld
    paparazzi3/trunk/sw/airborne/arch/lpc21/test/bootloader/lpc21iap.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/test/bootloader/printf.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/test/bootloader/startup.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/test/bootloader/startup.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/test/bootloader/type.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/test/bootloader/usbapi.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/test/bootloader/usbcontrol.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/test/bootloader/usbdebug.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/test/bootloader/usbdescrip.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/test/bootloader/usbhw_lpc.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/test/bootloader/usbhw_lpc.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/test/bootloader/usbinit.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/test/bootloader/usbstdreq.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/test/bootloader/usbstruct.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/test/crt0.S
    paparazzi3/trunk/sw/airborne/arch/lpc21/test/dev_board.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/test/inttypes.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/test/ledswitch.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/test/lpc2138.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/test/lpc21xx.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/test/timer.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/test/uart.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/test/uart_tunnel.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/test/welcome.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/trig_ext_hw.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/trig_ext_hw.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/uart_hw.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/uart_hw.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/uart_tunnel.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/usb_msc_hw.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/usb_msc_hw.h
    paparazzi3/trunk/sw/airborne/arch/lpc21/usb_ser_hw.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/usb_tunnel.c
    paparazzi3/trunk/sw/airborne/arch/lpc21/vic_slots.txt

Removed Paths:
-------------
    paparazzi3/trunk/sw/airborne/arm7/

Modified: paparazzi3/trunk/Makefile
===================================================================
--- paparazzi3/trunk/Makefile   2010-09-22 21:40:38 UTC (rev 5925)
+++ paparazzi3/trunk/Makefile   2010-09-22 23:23:55 UTC (rev 5926)
@@ -104,7 +104,7 @@
 static_h: $(MESSAGES_H) $(MESSAGES2_H) $(UBX_PROTOCOL_H) $(XSENS_PROTOCOL_H) 
$(DL_PROTOCOL_H) $(DL_PROTOCOL2_H)
 
 usb_lib:
-       @[ -d sw/airborne/arm7/lpcusb ] && ((test -x $(ARMGCC) && (cd 
sw/airborne/arm7/lpcusb; $(MAKE))) || echo "Not building usb_lib: 
ARMGCC=$(ARMGCC) not found") || echo "Not building usb_lib: 
sw/airborne/arm7/lpcusb directory missing"
+       @[ -d sw/airborne/arch/lpc21/lpcusb ] && ((test -x $(ARMGCC) && (cd 
sw/airborne/arch/lpc21/lpcusb; $(MAKE))) || echo "Not building usb_lib: 
ARMGCC=$(ARMGCC) not found") || echo "Not building usb_lib: 
sw/airborne/arch/lpc21/lpcusb directory missing"
 
 $(MESSAGES_H) : $(MESSAGES_XML) $(CONF_XML) tools
        $(Q)test -d $(STATICINCLUDE) || mkdir -p $(STATICINCLUDE)
@@ -152,17 +152,17 @@
 #
 # call with : make bl PROC=[TINY|FBW|AP|GENERIC]
 bl:
-       cd $(AIRBORNE)/arm7/test/bootloader; make clean; make 
+       cd $(AIRBORNE)/arch/lpc21/test/bootloader; make clean; make 
 
 BOOTLOADER_DEV=/dev/ttyUSB0
 upload_bl bl.upload: bl
-       lpc21isp -control $(AIRBORNE)/arm7/test/bootloader/bl.hex 
$(BOOTLOADER_DEV) 38400 12000
+       lpc21isp -control $(AIRBORNE)/arch/lpc21/test/bootloader/bl.hex 
$(BOOTLOADER_DEV) 38400 12000
 
 JTAG_INTERFACE = olimex-jtag-tiny.cfg
 #JTAG_INTERFACE = olimex-arm-usb-ocd.cfg
 
 upload_jtag: bl
-       openocd -f interface/$(JTAG_INTERFACE)  -f board/olimex_lpc_h2148.cfg 
-c init -c halt -c "flash write_image erase 
$(AIRBORNE)/arm7/test/bootloader/bl.hex"  -c reset -c shutdown
+       openocd -f interface/$(JTAG_INTERFACE)  -f board/olimex_lpc_h2148.cfg 
-c init -c halt -c "flash write_image erase 
$(AIRBORNE)/arch/lpc21/test/bootloader/bl.hex"  -c reset -c shutdown
 
 
 
@@ -170,15 +170,15 @@
        cd sw/ground_segment/lpc21iap; make
 
 upgrade_bl bl.upgrade: bl lpc21iap
-       $(PAPARAZZI_SRC)/sw/ground_segment/lpc21iap/lpc21iap 
$(AIRBORNE)/arm7/test/bootloader/bl_ram.elf
-       $(PAPARAZZI_SRC)/sw/ground_segment/lpc21iap/lpc21iap 
$(AIRBORNE)/arm7/test/bootloader/bl.elf
+       $(PAPARAZZI_SRC)/sw/ground_segment/lpc21iap/lpc21iap 
$(AIRBORNE)/arch/lpc21/test/bootloader/bl_ram.elf
+       $(PAPARAZZI_SRC)/sw/ground_segment/lpc21iap/lpc21iap 
$(AIRBORNE)/arch/lpc21/test/bootloader/bl.elf
 
 ms:
-       cd $(AIRBORNE)/arm7/lpcusb; make
-       cd $(AIRBORNE)/arm7/lpcusb/examples; make 
+       cd $(AIRBORNE)/arch/lpc21/lpcusb; make
+       cd $(AIRBORNE)/arch/lpc21/lpcusb/examples; make 
 
 upload_ms ms.upload: ms
-       $(PAPARAZZI_SRC)/sw/ground_segment/lpc21iap/lpc21iap 
$(AIRBORNE)/arm7/lpcusb/examples/msc.elf
+       $(PAPARAZZI_SRC)/sw/ground_segment/lpc21iap/lpc21iap 
$(AIRBORNE)/arch/lpc21/lpcusb/examples/msc.elf
 
 #####
 #####

Modified: paparazzi3/trunk/Makefile.ac
===================================================================
--- paparazzi3/trunk/Makefile.ac        2010-09-22 21:40:38 UTC (rev 5925)
+++ paparazzi3/trunk/Makefile.ac        2010-09-22 23:23:55 UTC (rev 5926)
@@ -162,7 +162,7 @@
 # Copy from Makefile, to get it in the paparazzi-bin package
 BOOTLOADER_DEVICE=/dev/ttyUSB0
 tiny_bl.upload:
-       lpc21isp -control $(AIRBORNE)/arm7/test/bootloader/bl.hex 
$(BOOTLOADER_DEVICE) 38400 12000
+       lpc21isp -control $(AIRBORNE)/arch/lpc21/test/bootloader/bl.hex 
$(BOOTLOADER_DEVICE) 38400 12000
 
 jsbsim jsbsim.compile: jsbsim.ac_h
        cd $(AIRBORNE); $(MAKE) TARGET=jsbsim ARCHI=jsbsim ARCH=jsbsim all

Modified: paparazzi3/trunk/conf/autopilot/fixedwing.makefile
===================================================================
--- paparazzi3/trunk/conf/autopilot/fixedwing.makefile  2010-09-22 21:40:38 UTC 
(rev 5925)
+++ paparazzi3/trunk/conf/autopilot/fixedwing.makefile  2010-09-22 23:23:55 UTC 
(rev 5926)
@@ -10,7 +10,7 @@
 
 
 SRC_FIXEDWING=.
-SRC_ARCH=$(SRC_FIXEDWING)/$(ARCH)
+SRC_ARCH=$(SRC_FIXEDWING)/arch/$(ARCH)
 SRC_FIXEDWING_TEST=$(SRC_FIXEDWING)/
 
 FIXEDWING_INC = -I$(SRC_FIXEDWING) -I$(SRC_FIXEDWING_ARCH)

Modified: paparazzi3/trunk/conf/autopilot/mercury_csc.makefile
===================================================================
--- paparazzi3/trunk/conf/autopilot/mercury_csc.makefile        2010-09-22 
21:40:38 UTC (rev 5925)
+++ paparazzi3/trunk/conf/autopilot/mercury_csc.makefile        2010-09-22 
23:23:55 UTC (rev 5926)
@@ -22,7 +22,7 @@
 #
 #
 
-ARCHI=arm7
+ARCHI=lpc21
 
 FLASH_MODE = ISP
 LPC21ISP_PORT = /dev/ttyUSB0

Modified: paparazzi3/trunk/conf/autopilot/rotorcraft.makefile
===================================================================
--- paparazzi3/trunk/conf/autopilot/rotorcraft.makefile 2010-09-22 21:40:38 UTC 
(rev 5925)
+++ paparazzi3/trunk/conf/autopilot/rotorcraft.makefile 2010-09-22 23:23:55 UTC 
(rev 5926)
@@ -40,28 +40,29 @@
 
 SRC_BOOZ_PRIV=booz_priv
 
+SRC_ARCH=arch/$(ARCH)
+
 CFG_BOOZ=$(PAPARAZZI_SRC)/conf/autopilot/
 
 BOOZ_INC = -I$(SRC_BOOZ) -I$(SRC_BOOZ_ARCH) -I$(SRC_BOARD)
 
 
-ap.ARCHDIR = $(ARCHI)
-# this is supposedly ignored by the stm32 makefile
+ap.ARCHDIR = $(ARCH)
 
 
 ap.CFLAGS += $(BOOZ_INC)
 ap.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG) -DPERIPHERALS_AUTO_INIT
 ap.srcs    = $(SRC_FIRMAWRE)/main.c
 
-ifeq ($(ARCHI), stm32)
+ifeq ($(ARCH), stm32)
 ap.srcs += lisa/plug_sys.c
 endif
 #
 # Interrupts
 #
-ifeq ($(ARCHI), arm7)
+ifeq ($(ARCH), lpc21)
 ap.srcs += $(SRC_ARCH)/armVIC.c
-else ifeq ($(ARCHI), stm32)
+else ifeq ($(ARCH), stm32)
 ap.srcs += $(SRC_ARCH)/stm32_exceptions.c
 ap.srcs += $(SRC_ARCH)/stm32_vector_table.c
 endif
@@ -70,7 +71,7 @@
 # LEDs
 #
 ap.CFLAGS += -DUSE_LED
-ifeq ($(ARCHI), stm32)
+ifeq ($(ARCH), stm32)
 ap.srcs += $(SRC_ARCH)/led_hw.c
 endif
 
@@ -80,7 +81,7 @@
 ap.CFLAGS += -DUSE_SYS_TIME
 ap.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
 ap.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./512.))'
-ifeq ($(ARCHI), stm32)
+ifeq ($(ARCH), stm32)
 ap.CFLAGS += -DSYS_TIME_LED=$(SYS_TIME_LED)
 endif
 
@@ -98,7 +99,7 @@
 ap.srcs   += $(SRC_BOOZ)/booz2_datalink.c
 ap.CFLAGS += -DUSE_$(MODEM_PORT) -D$(MODEM_PORT)_BAUD=$(MODEM_BAUD)
 
-ifeq ($(ARCHI), arm7)
+ifeq ($(ARCH), lpc21)
 ap.CFLAGS += -D$(MODEM_PORT)_VIC_SLOT=6
 endif
 
@@ -146,14 +147,14 @@
 #
 # Analog Backend
 #
-ifeq ($(ARCHI), arm7)
+ifeq ($(ARCH), lpc21)
 ap.CFLAGS += -DBOOZ2_ANALOG_BATTERY_PERIOD='SYS_TICS_OF_SEC((1./10.))'
 ap.srcs += $(SRC_BOOZ)/booz2_battery.c
 ap.CFLAGS += -DADC0_VIC_SLOT=2
 ap.CFLAGS += -DADC1_VIC_SLOT=3
 ap.srcs += $(SRC_BOOZ)/booz2_analog.c \
                   $(SRC_BOOZ_ARCH)/booz2_analog_hw.c
-else ifeq ($(ARCHI), stm32)
+else ifeq ($(ARCH), stm32)
 ap.srcs += lisa/lisa_analog_plug.c
 endif
 

Modified: 
paparazzi3/trunk/conf/autopilot/subsystems/fixedwing/actuators_4015.makefile
===================================================================
--- 
paparazzi3/trunk/conf/autopilot/subsystems/fixedwing/actuators_4015.makefile    
    2010-09-22 21:40:38 UTC (rev 5925)
+++ 
paparazzi3/trunk/conf/autopilot/subsystems/fixedwing/actuators_4015.makefile    
    2010-09-22 23:23:55 UTC (rev 5926)
@@ -1,6 +1,6 @@
 # for Tiny v1.1
 
 ap.CFLAGS      += -DACTUATORS=\"servos_4015_MAT_hw.h\" -DSERVOS_4015_MAT
-ap.srcs        += $(SRC_ARCH)/servos_4015_MAT_hw.c 
+ap.srcs        += $(SRC_ARCH)/servos_4015_MAT_hw.c
 ap.srcs        += $(SRC_FIXEDWING)/actuators.c
 

Modified: 
paparazzi3/trunk/conf/autopilot/subsystems/fixedwing/actuators_direct.makefile
===================================================================
--- 
paparazzi3/trunk/conf/autopilot/subsystems/fixedwing/actuators_direct.makefile  
    2010-09-22 21:40:38 UTC (rev 5925)
+++ 
paparazzi3/trunk/conf/autopilot/subsystems/fixedwing/actuators_direct.makefile  
    2010-09-22 23:23:55 UTC (rev 5926)
@@ -7,7 +7,7 @@
 # TODO TODO UGLY HACK: We re-use the booz actuators: Should become universal 
actuator code!!
 # Carefull: paths might get broken with this silly rotorcraft/fixedwing mixup 
of directories
 
-ifeq ($(ARCHI), stm32)
+ifeq ($(ARCH), stm32)
 ap.srcs    += 
$(SRC_FIXEDWING)/booz/arch/stm32/actuators/booz_actuators_pwm_arch.c
 ap.CFLAGS  += -I$(SRC_FIXEDWING)/booz/arch/stm32/
 endif

Modified: 
paparazzi3/trunk/conf/autopilot/subsystems/fixedwing/autopilot.makefile
===================================================================
--- paparazzi3/trunk/conf/autopilot/subsystems/fixedwing/autopilot.makefile     
2010-09-22 21:40:38 UTC (rev 5925)
+++ paparazzi3/trunk/conf/autopilot/subsystems/fixedwing/autopilot.makefile     
2010-09-22 23:23:55 UTC (rev 5926)
@@ -50,8 +50,8 @@
 #
 
 $(TARGET).CFLAGS       += -DLED
-ifneq ($(ARCHI), arm7)
-  ifneq ($(ARCHI), jsbsim)
+ifneq ($(ARCH), lpc21)
+  ifneq ($(ARCH), jsbsim)
     $(TARGET).srcs     += $(SRC_ARCH)/led_hw.c
   endif
 endif
@@ -78,15 +78,15 @@
 # Interrupt Vectors
 #
 
-ifeq ($(ARCHI), arm7)
+ifeq ($(ARCH), lpc21)
   ns_srcs              += $(SRC_ARCH)/armVIC.c
-else ifeq ($(ARCHI), stm32)
+else ifeq ($(ARCH), stm32)
   ns_srcs              += $(SRC_ARCH)/stm32_exceptions.c
   ns_srcs              += $(SRC_ARCH)/stm32_vector_table.c
   ns_CFLAGS            += -DPERIPHERALS_AUTO_INIT
 endif
 
-ifeq ($(ARCHI), stm32)
+ifeq ($(ARCH), stm32)
   ns_srcs              += lisa/plug_sys.c
 endif
 
@@ -102,7 +102,7 @@
 #
 
 ns_CFLAGS              += -DUSE_LED
-ifeq ($(ARCHI), stm32)
+ifeq ($(ARCH), stm32)
   ns_CFLAGS    += -DSYS_TIME_LED=1
 else
   ns_CFLAGS    += -DTIME_LED=1
@@ -127,10 +127,10 @@
 # ANALOG
 #
 
-ifeq ($(ARCHI), arm7)
+ifeq ($(ARCH), lpc21)
   ns_CFLAGS            += -DADC
   ns_srcs              += $(SRC_ARCH)/adc_hw.c
-else ifeq ($(ARCHI), stm32)
+else ifeq ($(ARCH), stm32)
   ns_srcs              += lisa/lisa_analog_plug.c
 endif
 

Modified: 
paparazzi3/trunk/conf/autopilot/subsystems/fixedwing/radio_control_ppm.makefile
===================================================================
--- 
paparazzi3/trunk/conf/autopilot/subsystems/fixedwing/radio_control_ppm.makefile 
    2010-09-22 21:40:38 UTC (rev 5925)
+++ 
paparazzi3/trunk/conf/autopilot/subsystems/fixedwing/radio_control_ppm.makefile 
    2010-09-22 23:23:55 UTC (rev 5926)
@@ -12,13 +12,13 @@
 ifeq ($(NORADIO), False)
   $(TARGET).CFLAGS     += -DRADIO_CONTROL
   $(TARGET).srcs       += $(SRC_FIXEDWING)/radio_control.c
-  ifneq ($(ARCHI),jsbsim)
+  ifneq ($(ARCH),jsbsim)
     $(TARGET).srcs     += $(SRC_ARCH)/ppm_hw.c
   endif
 endif
 
 
-ifeq ($(ARCHI),stm32)
+ifeq ($(ARCH),stm32)
   ap.CFLAGS  += -I$(SRC_FIXEDWING)/booz/
   ap.CFLAGS  += -I$(SRC_FIXEDWING)/booz/arch/stm32/
 

Modified: paparazzi3/trunk/conf/autopilot/subsystems/fixedwing/testing.makefile
===================================================================
--- paparazzi3/trunk/conf/autopilot/subsystems/fixedwing/testing.makefile       
2010-09-22 21:40:38 UTC (rev 5925)
+++ paparazzi3/trunk/conf/autopilot/subsystems/fixedwing/testing.makefile       
2010-09-22 23:23:55 UTC (rev 5926)
@@ -1,21 +1,21 @@
 ## TODO This file probably needs to move to the board specific folder
 
 # a test program to setup actuators
-setup_actuators.ARCHDIR = $(ARCHI)
+setup_actuators.ARCHDIR = $(ARCH)
 
 setup_actuators.CFLAGS += -DFBW -DBOARD_CONFIG=\"tiny.h\" -DLED -DTIME_LED=1 
-DACTUATORS=\"servos_4015_hw.h\" -DSERVOS_4015 -DUSE_UART0 -DUART0_BAUD=B9600 
-DDATALINK=PPRZ -DPPRZ_UART=Uart0
 setup_actuators.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c 
$(SRC_ARCH)/armVIC.c pprz_transport.c setup_actuators.c $(SRC_ARCH)/uart_hw.c 
$(SRC_ARCH)/servos_4015_hw.c main.c
 
 
 # a test program to tunnel between both uart
-tunnel.ARCHDIR = $(ARCHI)
+tunnel.ARCHDIR = $(ARCH)
 
 tunnel.CFLAGS += -DFBW -DBOARD_CONFIG=\"tiny_2_1_1_usb.h\" -DLED
 tunnel.srcs += $(SRC_ARCH)/uart_tunnel.c
 
 
 # A test program to monitor the ADC values
-test_adcs.ARCHDIR = $(ARCHI)
+test_adcs.ARCHDIR = $(ARCH)
 
 test_adcs.CFLAGS += -DBOARD_CONFIG=$(CONFIG) -DLED -DTIME_LED=1 -DADC 
-DUSE_ADC_0 -DUSE_ADC_1 -DUSE_ADC_2 -DUSE_ADC_3 -DUSE_ADC_4 -DUSE_ADC_5 
-DUSE_ADC_6 -DUSE_ADC_7
 test_adcs.CFLAGS += -DDOWNLINK -DUSE_UART0 -DDOWNLINK_TRANSPORT=XBeeTransport 
-DDOWNLINK_FBW_DEVICE=Uart0 -DDOWNLINK_AP_DEVICE=Uart0 -DXBEE_UART=Uart0 
-DDATALINK=XBEE -DUART0_BAUD=B9600
@@ -26,7 +26,7 @@
 
 
 # a configuration program to access both uart through usb
-usb_tunnel_0.ARCHDIR = $(ARCHI)
+usb_tunnel_0.ARCHDIR = $(ARCH)
 usb_tunnel_0.CFLAGS += -DFBW -DBOARD_CONFIG=\"tiny_2_1_1_usb.h\" -DUSE_UART0 
-DUART0_BAUD=B115200
 usb_tunnel_0.CFLAGS += -DUSE_USB_LINE_CODING -DUSE_USB_SERIAL -DLED
 usb_tunnel_0.srcs += $(SRC_ARCH)/usb_tunnel.c $(SRC_ARCH)/usb_ser_hw.c 
$(SRC_ARCH)/uart_hw.c
@@ -34,7 +34,7 @@
 usb_tunnel_0.srcs += $(SRC_ARCH)/lpcusb/usbcontrol.c 
$(SRC_ARCH)/lpcusb/usbstdreq.c
 usb_tunnel_0.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c
 
-usb_tunnel_1.ARCHDIR = $(ARCHI)
+usb_tunnel_1.ARCHDIR = $(ARCH)
 usb_tunnel_1.CFLAGS += -DFBW -DBOARD_CONFIG=\"tiny_2_1_1_usb.h\" -DUSE_UART1 
-DUART1_BAUD=B115200
 usb_tunnel_1.CFLAGS += -DUSE_USB_LINE_CODING -DUSE_USB_SERIAL -DLED
 usb_tunnel_1.srcs += $(SRC_ARCH)/usb_tunnel.c $(SRC_ARCH)/usb_ser_hw.c 
$(SRC_ARCH)/uart_hw.c

Modified: 
paparazzi3/trunk/conf/autopilot/subsystems/lisa_passthrough/imu_b2_v1.1.makefile
===================================================================
--- 
paparazzi3/trunk/conf/autopilot/subsystems/lisa_passthrough/imu_b2_v1.1.makefile
    2010-09-22 21:40:38 UTC (rev 5925)
+++ 
paparazzi3/trunk/conf/autopilot/subsystems/lisa_passthrough/imu_b2_v1.1.makefile
    2010-09-22 23:23:55 UTC (rev 5926)
@@ -12,7 +12,7 @@
 #    <define name="GYRO_X_SENS" value=" 1.01" integer="16"/>
 #    <define name="GYRO_Y_SENS" value="-1.01" integer="16"/>
 #    <define name="GYRO_Z_SENS" value="-1.01" integer="16"/>
-# 
+#
 #    <define name="ACCEL_X_NEUTRAL" value="32081"/>
 #    <define name="ACCEL_Y_NEUTRAL" value="33738"/>
 #    <define name="ACCEL_Z_NEUTRAL" value="32441"/>
@@ -22,13 +22,13 @@
 #    <define name="ACCEL_Z_SENS" value="-2.51396167" integer="16"/>
 #
 #    <define name="MAG_X_NEUTRAL" value="2358"/>
-#    <define name="MAG_Y_NEUTRAL" value="2362"/> 
+#    <define name="MAG_Y_NEUTRAL" value="2362"/>
 #    <define name="MAG_Z_NEUTRAL" value="2119"/>
 #
 #    <define name="MAG_X_SENS" value="-3.4936416" integer="16"/>
 #    <define name="MAG_Y_SENS" value=" 3.607713" integer="16"/>
 #    <define name="MAG_Z_SENS" value="-4.90788848" integer="16"/>
-#    <define name="MAG_45_HACK" value="1"/> 
+#    <define name="MAG_45_HACK" value="1"/>
 #
 #  </section>
 #
@@ -44,22 +44,20 @@
 $(TARGET).CFLAGS += -DIMU_B2_MAG_TYPE=IMU_B2_MAG_MS2001
 $(TARGET).CFLAGS += -DIMU_B2_VERSION_1_1
 $(TARGET).srcs += $(SRC_BOOZ)/booz_imu.c                   \
-           $(SRC_BOOZ)/imu/booz_imu_b2.c            \
-           $(SRC_BOOZ_ARCH)/imu/booz_imu_b2_arch.c
+                  $(SRC_BOOZ)/imu/booz_imu_b2.c            \
+                  $(SRC_BOOZ_ARCH)/imu/booz_imu_b2_arch.c
 
 $(TARGET).srcs += $(SRC_BOOZ)/peripherals/booz_max1168.c \
-           $(SRC_BOOZ_ARCH)/peripherals/booz_max1168_arch.c
+                  $(SRC_BOOZ_ARCH)/peripherals/booz_max1168_arch.c
 
 $(TARGET).srcs += $(SRC_BOOZ)/peripherals/booz_ms2001.c \
-           $(SRC_BOOZ_ARCH)/peripherals/booz_ms2001_arch.c
+                  $(SRC_BOOZ_ARCH)/peripherals/booz_ms2001_arch.c
 
-# FIXME : that would lpc21
-#ifeq ($(ap.ARCH), arm7tmdi)
-ifeq ($(ARCHI), arm7)
+ifeq ($(ARCH), lpc21)
 $(TARGET).CFLAGS += -DSSP_VIC_SLOT=9
 $(TARGET).CFLAGS += -DMAX1168_EOC_VIC_SLOT=8
 $(TARGET).CFLAGS += -DMS2001_DRDY_VIC_SLOT=11
-else ifeq ($(ARCHI), stm32) 
+else ifeq ($(ARCH), stm32)
 $(TARGET).CFLAGS += -DUSE_SPI2 -DUSE_DMA1_C4_IRQ -DUSE_EXTI2_IRQ -DUSE_SPI2_IRQ
 $(TARGET).CFLAGS += -DMAX_1168_DRDY_PORT=$(MAX_1168_DRDY_PORT)
 $(TARGET).CFLAGS += -DMAX_1168_DRDY_PORT_SOURCE=$(MAX_1168_DRDY_PORT_SOURCE)
@@ -73,12 +71,12 @@
 sim.CFLAGS += -DIMU_B2_VERSION_1_1
 sim.CFLAGS += -DIMU_B2_MAG_TYPE=IMU_B2_MAG_AMI601
 sim.srcs += $(SRC_BOOZ)/booz_imu.c                 \
-            $(SRC_BOOZ)/imu/booz_imu_b2.c          \
-            $(SRC_BOOZ_SIM)/imu/booz_imu_b2_arch.c
+                       $(SRC_BOOZ)/imu/booz_imu_b2.c          \
+                       $(SRC_BOOZ_SIM)/imu/booz_imu_b2_arch.c
 
 
 sim.srcs += $(SRC_BOOZ)/peripherals/booz_max1168.c \
-            $(SRC_BOOZ_SIM)/peripherals/booz_max1168_arch.c
+                       $(SRC_BOOZ_SIM)/peripherals/booz_max1168_arch.c
 
 sim.CFLAGS += -DUSE_AMI601
 sim.srcs += $(SRC_BOOZ)/peripherals/booz_ami601.c

Modified: 
paparazzi3/trunk/conf/autopilot/subsystems/rotorcraft/actuators_asctec.makefile
===================================================================
--- 
paparazzi3/trunk/conf/autopilot/subsystems/rotorcraft/actuators_asctec.makefile 
    2010-09-22 21:40:38 UTC (rev 5925)
+++ 
paparazzi3/trunk/conf/autopilot/subsystems/rotorcraft/actuators_asctec.makefile 
    2010-09-22 23:23:55 UTC (rev 5926)
@@ -2,12 +2,12 @@
 ap.srcs += $(SRC_BOOZ)/actuators/booz_actuators_asctec.c
 ap.srcs += i2c.c $(SRC_ARCH)/i2c_hw.c
 
-ifeq ($(ARCHI), arm7)
+ifeq ($(ARCH), lpc21)
 ap.CFLAGS += -DACTUATORS_ASCTEC_DEVICE=i2c0
 ap.CFLAGS += -DUSE_I2C0 -DI2C0_SCLL=150 -DI2C0_SCLH=150 -DI2C0_VIC_SLOT=10
 endif
 
-ifeq ($(ARCHI), stm32) 
+ifeq ($(ARCH), stm32)
 ap.CFLAGS += -DACTUATORS_ASCTEC_DEVICE=i2c1
 ap.CFLAGS += -DUSE_I2C1
 endif

Modified: 
paparazzi3/trunk/conf/autopilot/subsystems/rotorcraft/actuators_asctec_v2.makefile
===================================================================
--- 
paparazzi3/trunk/conf/autopilot/subsystems/rotorcraft/actuators_asctec_v2.makefile
  2010-09-22 21:40:38 UTC (rev 5925)
+++ 
paparazzi3/trunk/conf/autopilot/subsystems/rotorcraft/actuators_asctec_v2.makefile
  2010-09-22 23:23:55 UTC (rev 5926)
@@ -21,12 +21,12 @@
 ap.srcs += $(SRC_BOOZ)/actuators/booz_actuators_asctec.c
 ap.srcs += i2c.c $(SRC_ARCH)/i2c_hw.c
 
-ifeq ($(ARCHI), arm7)
+ifeq ($(ARCH), lpc21)
 ap.CFLAGS += -DACTUATORS_ASCTEC_DEVICE=i2c0
 ap.CFLAGS += -DUSE_I2C0 -DI2C0_SCLL=150 -DI2C0_SCLH=150 -DI2C0_VIC_SLOT=10
 endif
 
-ifeq ($(ARCHI), stm32) 
+ifeq ($(ARCH), stm32)
 ap.CFLAGS += -DACTUATORS_ASCTEC_DEVICE=i2c1
 ap.CFLAGS += -DUSE_I2C1
 endif

Modified: 
paparazzi3/trunk/conf/autopilot/subsystems/rotorcraft/actuators_mkk.makefile
===================================================================
--- 
paparazzi3/trunk/conf/autopilot/subsystems/rotorcraft/actuators_mkk.makefile    
    2010-09-22 21:40:38 UTC (rev 5925)
+++ 
paparazzi3/trunk/conf/autopilot/subsystems/rotorcraft/actuators_mkk.makefile    
    2010-09-22 23:23:55 UTC (rev 5926)
@@ -30,10 +30,10 @@
 ap.srcs += $(SRC_BOOZ)/actuators/booz_actuators_mkk.c
 ap.srcs += i2c.c $(SRC_ARCH)/i2c_hw.c
 
-ifeq ($(ARCHI), arm7)
+ifeq ($(ARCH), lpc21)
 ap.CFLAGS += -DACTUATORS_MKK_DEVICE=i2c0
 ap.CFLAGS += -DUSE_I2C0 -DI2C0_SCLL=150 -DI2C0_SCLH=150 -DI2C0_VIC_SLOT=10
-else ifeq ($(ARCHI), stm32) 
+else ifeq ($(ARCH), stm32)
 ap.CFLAGS += -DACTUATORS_MKK_DEVICE=i2c1
 ap.CFLAGS += -DUSE_I2C1
 endif

Modified: paparazzi3/trunk/conf/autopilot/subsystems/rotorcraft/fdm_nps.makefile
===================================================================
--- paparazzi3/trunk/conf/autopilot/subsystems/rotorcraft/fdm_nps.makefile      
2010-09-22 21:40:38 UTC (rev 5925)
+++ paparazzi3/trunk/conf/autopilot/subsystems/rotorcraft/fdm_nps.makefile      
2010-09-22 23:23:55 UTC (rev 5926)
@@ -16,7 +16,7 @@
 NPSDIR = $(SIMDIR)/nps
 
 
-sim.ARCHDIR = $(ARCHI)
+sim.ARCHDIR = $(ARCH)
 
 sim.CFLAGS  += -DSITL
 sim.CFLAGS  += `pkg-config glib-2.0 --cflags` -I /usr/include/meschach

Modified: 
paparazzi3/trunk/conf/autopilot/subsystems/rotorcraft/gps_skytraq.makefile
===================================================================
--- paparazzi3/trunk/conf/autopilot/subsystems/rotorcraft/gps_skytraq.makefile  
2010-09-22 21:40:38 UTC (rev 5925)
+++ paparazzi3/trunk/conf/autopilot/subsystems/rotorcraft/gps_skytraq.makefile  
2010-09-22 23:23:55 UTC (rev 5926)
@@ -6,7 +6,7 @@
 ap.CFLAGS += -DUSE_$(GPS_PORT) -D$(GPS_PORT)_BAUD=$(GPS_BAUD)
 ap.CFLAGS += -DUSE_GPS -DGPS_LINK=$(GPS_PORT) -DGPS_LED=$(GPS_LED)
 
-ifeq ($(ARCHI), arm7)
+ifeq ($(ARCH), lpc21)
 ap.CFLAGS += -D$(GPS_PORT)_VIC_SLOT=5
 endif
 

Modified: 
paparazzi3/trunk/conf/autopilot/subsystems/rotorcraft/gps_ublox.makefile
===================================================================
--- paparazzi3/trunk/conf/autopilot/subsystems/rotorcraft/gps_ublox.makefile    
2010-09-22 21:40:38 UTC (rev 5925)
+++ paparazzi3/trunk/conf/autopilot/subsystems/rotorcraft/gps_ublox.makefile    
2010-09-22 23:23:55 UTC (rev 5926)
@@ -6,7 +6,7 @@
 ap.CFLAGS += -DUSE_$(GPS_PORT) -D$(GPS_PORT)_BAUD=$(GPS_BAUD)
 ap.CFLAGS += -DUSE_GPS -DGPS_LINK=$(GPS_PORT) -DGPS_LED=$(GPS_LED)
 
-ifeq ($(ARCHI), arm7)
+ifeq ($(ARCH), lpc21)
 ap.CFLAGS += -D$(GPS_PORT)_VIC_SLOT=5
 endif
 

Modified: 
paparazzi3/trunk/conf/autopilot/subsystems/rotorcraft/imu_b2_v1.1.makefile
===================================================================
--- paparazzi3/trunk/conf/autopilot/subsystems/rotorcraft/imu_b2_v1.1.makefile  
2010-09-22 21:40:38 UTC (rev 5925)
+++ paparazzi3/trunk/conf/autopilot/subsystems/rotorcraft/imu_b2_v1.1.makefile  
2010-09-22 23:23:55 UTC (rev 5926)
@@ -12,7 +12,7 @@
 #    <define name="GYRO_X_SENS" value=" 1.01" integer="16"/>
 #    <define name="GYRO_Y_SENS" value="-1.01" integer="16"/>
 #    <define name="GYRO_Z_SENS" value="-1.01" integer="16"/>
-# 
+#
 #    <define name="ACCEL_X_NEUTRAL" value="32081"/>
 #    <define name="ACCEL_Y_NEUTRAL" value="33738"/>
 #    <define name="ACCEL_Z_NEUTRAL" value="32441"/>
@@ -22,13 +22,13 @@
 #    <define name="ACCEL_Z_SENS" value="-2.51396167" integer="16"/>
 #
 #    <define name="MAG_X_NEUTRAL" value="2358"/>
-#    <define name="MAG_Y_NEUTRAL" value="2362"/> 
+#    <define name="MAG_Y_NEUTRAL" value="2362"/>
 #    <define name="MAG_Z_NEUTRAL" value="2119"/>
 #
 #    <define name="MAG_X_SENS" value="-3.4936416" integer="16"/>
 #    <define name="MAG_Y_SENS" value=" 3.607713" integer="16"/>
 #    <define name="MAG_Z_SENS" value="-4.90788848" integer="16"/>
-#    <define name="MAG_45_HACK" value="1"/> 
+#    <define name="MAG_45_HACK" value="1"/>
 #
 #  </section>
 #
@@ -44,21 +44,20 @@
 imu_CFLAGS += -DIMU_B2_MAG_TYPE=IMU_B2_MAG_MS2001
 imu_CFLAGS += -DIMU_B2_VERSION_1_1
 imu_srcs += $(SRC_BOOZ)/booz_imu.c                   \
-           $(SRC_BOOZ)/imu/booz_imu_b2.c            \
-           $(SRC_BOOZ_ARCH)/imu/booz_imu_b2_arch.c
+                  $(SRC_BOOZ)/imu/booz_imu_b2.c            \
+                  $(SRC_BOOZ_ARCH)/imu/booz_imu_b2_arch.c
 
 imu_srcs += $(SRC_BOOZ)/peripherals/booz_max1168.c \
-           $(SRC_BOOZ_ARCH)/peripherals/booz_max1168_arch.c
+                  $(SRC_BOOZ_ARCH)/peripherals/booz_max1168_arch.c
 
 imu_srcs += $(SRC_BOOZ)/peripherals/booz_ms2001.c \
-           $(SRC_BOOZ_ARCH)/peripherals/booz_ms2001_arch.c
+                  $(SRC_BOOZ_ARCH)/peripherals/booz_ms2001_arch.c
 
-# FIXME : that would lpc21
-ifeq ($(ARCHI), arm7)
+ifeq ($(ARCH), lpc21)
 imu_CFLAGS += -DSSP_VIC_SLOT=9
 imu_CFLAGS += -DMAX1168_EOC_VIC_SLOT=8
 imu_CFLAGS += -DMS2001_DRDY_VIC_SLOT=11
-else ifeq ($(ARCHI), stm32) 
+else ifeq ($(ARCH), stm32)
 imu_CFLAGS += -DUSE_SPI2 -DUSE_DMA1_C4_IRQ -DUSE_EXTI2_IRQ -DUSE_SPI2_IRQ
 imu_CFLAGS += -DMAX_1168_DRDY_PORT=$(MAX_1168_DRDY_PORT)
 imu_CFLAGS += -DMAX_1168_DRDY_PORT_SOURCE=$(MAX_1168_DRDY_PORT_SOURCE)
@@ -77,12 +76,12 @@
 sim.CFLAGS += -DIMU_B2_VERSION_1_1
 sim.CFLAGS += -DIMU_B2_MAG_TYPE=IMU_B2_MAG_AMI601
 sim.srcs += $(SRC_BOOZ)/booz_imu.c                 \
-            $(SRC_BOOZ)/imu/booz_imu_b2.c          \
-            $(SRC_BOOZ_SIM)/imu/booz_imu_b2_arch.c
+                       $(SRC_BOOZ)/imu/booz_imu_b2.c          \
+                       $(SRC_BOOZ_SIM)/imu/booz_imu_b2_arch.c
 
 
 sim.srcs += $(SRC_BOOZ)/peripherals/booz_max1168.c \
-            $(SRC_BOOZ_SIM)/peripherals/booz_max1168_arch.c
+                       $(SRC_BOOZ_SIM)/peripherals/booz_max1168_arch.c
 
 sim.CFLAGS += -DUSE_AMI601
 sim.srcs += $(SRC_BOOZ)/peripherals/booz_ami601.c

Modified: paparazzi3/trunk/conf/autopilot/tiny.makefile
===================================================================
--- paparazzi3/trunk/conf/autopilot/tiny.makefile       2010-09-22 21:40:38 UTC 
(rev 5925)
+++ paparazzi3/trunk/conf/autopilot/tiny.makefile       2010-09-22 23:23:55 UTC 
(rev 5926)
@@ -1,5 +1,10 @@
 # Makefile for the Tiny board (1 arm7tdmi, 1 LEA-LA)
 
+#
+# can we remove this file?
+# the makefiles under conf/boards/ should be used now
+#
+
 ARCHI=arm7
 ARCH=arm7
 

Modified: paparazzi3/trunk/conf/boards/booz_1.0.makefile
===================================================================
--- paparazzi3/trunk/conf/boards/booz_1.0.makefile      2010-09-22 21:40:38 UTC 
(rev 5925)
+++ paparazzi3/trunk/conf/boards/booz_1.0.makefile      2010-09-22 23:23:55 UTC 
(rev 5926)
@@ -4,7 +4,7 @@
 # http://paparazzi.enac.fr/wiki/Booz
 #
 ARCH=lpc21
-ARCHI=arm7
+ARCHI=lpc21
 BOARD=booz
 BOARD_VERSION=1.0
 BOARD_CFG=\"boards/$(BOARD)_$(BOARD_VERSION).h\"
@@ -33,4 +33,4 @@
 
 GPS_PORT=UART0
 GPS_BAUD=B38400
-GPS_LED=4
\ No newline at end of file
+GPS_LED=4

Modified: paparazzi3/trunk/conf/boards/classix.makefile
===================================================================
--- paparazzi3/trunk/conf/boards/classix.makefile       2010-09-22 21:40:38 UTC 
(rev 5925)
+++ paparazzi3/trunk/conf/boards/classix.makefile       2010-09-22 23:23:55 UTC 
(rev 5926)
@@ -3,9 +3,8 @@
 #
 # http://paparazzi.enac.fr/wiki/Classix
 #
-# TODO: move all to new directories
-# ARCH=lpc21
-ARCH=arm7tdmi
+
+ARCH=lpc21
 ARCHI=arm7
 
 
@@ -30,7 +29,7 @@
 GPS_BAUD       = B38400
 
 # All targets on the TINY board run on the same processor achitecture
-$(TARGET).ARCHDIR = $(ARCHI)
+$(TARGET).ARCHDIR = $(ARCH)
 
 # Battery Voltage
 fbw.CFLAGS +=  -DUSE_AD0

Modified: paparazzi3/trunk/conf/boards/tiny_2.11.makefile
===================================================================
--- paparazzi3/trunk/conf/boards/tiny_2.11.makefile     2010-09-22 21:40:38 UTC 
(rev 5925)
+++ paparazzi3/trunk/conf/boards/tiny_2.11.makefile     2010-09-22 23:23:55 UTC 
(rev 5926)
@@ -5,7 +5,7 @@
 #
 # TODO: move all to new directories
 # ARCH=lpc21
-ARCH=arm7
+ARCH=lpc21
 ARCHI=arm7
 
 
@@ -43,5 +43,5 @@
 ADC_GENERIC_NB_SAMPLES = 16
 
 # All targets on the TINY board run on the same processor achitecture
-$(TARGET).ARCHDIR = $(ARCHI)
+$(TARGET).ARCHDIR = $(ARCH)
 

Modified: paparazzi3/trunk/sw/airborne/Makefile
===================================================================
--- paparazzi3/trunk/sw/airborne/Makefile       2010-09-22 21:40:38 UTC (rev 
5925)
+++ paparazzi3/trunk/sw/airborne/Makefile       2010-09-22 23:23:55 UTC (rev 
5926)
@@ -26,9 +26,10 @@
 VARINCLUDE=$(PAPARAZZI_HOME)/var/include
 ACINCLUDE = $(PAPARAZZI_HOME)/var/$(AIRCRAFT)
 
-INCLUDES = -I $(PAPARAZZI_SRC)/sw/include -I $(PAPARAZZI_SRC)/sw/airborne -I 
$(PAPARAZZI_SRC)/conf/autopilot -I 
$(PAPARAZZI_SRC)/sw/airborne/$($(TARGET).ARCHDIR) -I $(VARINCLUDE) -I 
$(ACINCLUDE)
+INCLUDES = -I $(PAPARAZZI_SRC)/sw/include -I $(PAPARAZZI_SRC)/sw/airborne -I 
$(PAPARAZZI_SRC)/conf/autopilot -I 
$(PAPARAZZI_SRC)/sw/airborne/arch/$($(TARGET).ARCHDIR) -I $(VARINCLUDE) -I 
$(ACINCLUDE)
 
-SRC_ARCH = $(PAPARAZZI_SRC)/sw/airborne/$(ARCHDIR)
+# doesn't seem to be used/needed
+#SRC_ARCH = $(PAPARAZZI_SRC)/sw/airborne/$(ARCHDIR)
 
 ifneq ($(MAKECMDGOALS),clean)
 include $(PAPARAZZI_HOME)/var/$(AIRCRAFT)/Makefile.ac

Copied: paparazzi3/trunk/sw/airborne/arch/lpc21/ADS8344.c (from rev 5925, 
paparazzi3/trunk/sw/airborne/arm7/ADS8344.c)
===================================================================
--- paparazzi3/trunk/sw/airborne/arch/lpc21/ADS8344.c                           
(rev 0)
+++ paparazzi3/trunk/sw/airborne/arch/lpc21/ADS8344.c   2010-09-22 23:23:55 UTC 
(rev 5926)
@@ -0,0 +1,147 @@
+/*
+ * $Id$
+ *  
+ * Copyright (C) 2008- ENAC
+ *
+ * This file is part of paparazzi.
+ *
+ * paparazzi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * paparazzi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with paparazzi; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA. 
+ *
+ */
+
+#include "ADS8344.h"
+#include "LPC21xx.h"
+#include "armVIC.h"
+#include BOARD_CONFIG
+#include "led.h"
+#include "spi_hw.h"
+
+#define ADS8344_SS_IODIR IO0DIR
+#define ADS8344_SS_IOSET IO0SET
+#define ADS8344_SS_IOCLR IO0CLR
+#define ADS8344_SS_PIN   20 
+
+#define ADS8344Select()   SetBit(ADS8344_SS_IOCLR,ADS8344_SS_PIN)
+#define ADS8344Unselect() SetBit(ADS8344_SS_IOSET,ADS8344_SS_PIN)
+
+bool_t ADS8344_available;
+uint16_t ADS8344_values[NB_CHANNELS];
+
+#define POWER_MODE (1 << 1 | 1)
+#define SGL_DIF 1 // Single ended
+
+
+/* set SSP input clock, PCLK / CPSDVSR = 750kHz      */
+/* SSP clock, 750kHz / (SCR+1) = 750kHz / 15 = 50kHz */
+
+#if (PCLK == 15000000)
+#define CPSDVSR    20
+#else
+
+#if (PCLK == 30000000)
+#define CPSDVSR    40
+#else
+
+#if (PCLK == 60000000)
+#define CPSDVSR    80
+#else
+
+#error unknown PCLK frequency
+#endif
+#endif
+#endif
+
+/* SSPCR0 settings */
+#define SSP_DSS  0x07 << 0  /* data size            : 8 bits   */
+#define SSP_FRF  0x00 << 4  /* frame format         : SPI      */
+#define SSP_CPOL 0x00 << 6  /* clock polarity       : idle low */  
+#define SSP_CPHA 0x00 << 7  /* clock phase          : 1        */
+#define SSP_SCR  0x0E << 8  /* serial clock rate    : 1MHz     */
+
+/* SSPCR1 settings */
+#define SSP_LBM  0x00 << 0  /* loopback mode        : disabled */
+#define SSP_SSE  0x00 << 1  /* SSP enable           : disabled */
+#define SSP_MS   0x00 << 2  /* master slave mode    : master   */
+#define SSP_SOD  0x00 << 3  /* slave output disable : disabled */
+
+
+static void SPI1_ISR(void) __attribute__((naked));
+static uint8_t channel;
+
+void ADS8344_init( void ) {
+  channel = 0;
+  ADS8344_available = FALSE;
+
+  /* setup pins for SSP (SCK, MISO, MOSI) */
+  PINSEL1 |= 2 << 2 | 2 << 4 | 2 << 6;
+  
+  /* setup SSP */
+  SSPCR0 = SSP_DSS | SSP_FRF | SSP_CPOL | SSP_CPHA | SSP_SCR;
+  SSPCR1 = SSP_LBM | SSP_MS | SSP_SOD;
+  SSPCPSR = CPSDVSR; /* -> 50kHz */
+  
+  /* initialize interrupt vector */
+  VICIntSelect &= ~VIC_BIT(VIC_SPI1);   // SPI1 selected as IRQ
+  VICIntEnable = VIC_BIT(VIC_SPI1);     // SPI1 interrupt enabled
+  VICVectCntl7 = VIC_ENABLE | VIC_SPI1;
+  VICVectAddr7 = (uint32_t)SPI1_ISR;    // address of the ISR 
+
+  /* setup slave select */
+  /* configure SS pin */
+  SetBit( ADS8344_SS_IODIR,  ADS8344_SS_PIN);  /* pin is output  */
+  ADS8344Unselect();                           /* pin low        */
+}
+
+static inline void read_values( void ) {
+  uint8_t foo __attribute__ ((unused)) = SSPDR;
+  uint8_t msb = SSPDR;
+  uint8_t lsb = SSPDR;
+  uint8_t llsb = SSPDR;
+  ADS8344_values[channel] = (msb << 8 | lsb) << 1 | llsb >> 7;
+}
+
+static inline void send_request( void ) {
+  uint8_t control = 1 << 7 | channel << 4 | SGL_DIF << 2 | POWER_MODE;
+
+  SSPDR = control;
+  SSPDR = 0;
+  SSPDR = 0;
+  SSPDR = 0;
+}
+
+void ADS8344_start( void ) {
+  ADS8344Select();
+  SpiClearRti();
+  SpiEnableRti();
+  SpiEnable();
+  send_request();
+}
+
+void SPI1_ISR(void) {
+ ISR_ENTRY();
+ LED_TOGGLE(2);
+ read_values();
+ channel++;
+ if (channel > 7) {
+   channel = 0;
+   ADS8344_available = TRUE;
+ }
+ send_request();
+ SpiClearRti();
+
+ VICVectAddr = 0x00000000; /* clear this interrupt from the VIC */
+ ISR_EXIT();
+}

Copied: paparazzi3/trunk/sw/airborne/arch/lpc21/ADS8344.h (from rev 5925, 
paparazzi3/trunk/sw/airborne/arm7/ADS8344.h)
===================================================================
--- paparazzi3/trunk/sw/airborne/arch/lpc21/ADS8344.h                           
(rev 0)
+++ paparazzi3/trunk/sw/airborne/arch/lpc21/ADS8344.h   2010-09-22 23:23:55 UTC 
(rev 5926)
@@ -0,0 +1,38 @@
+/*
+ * $Id$
+ *  
+ * Copyright (C) 2008- ENAC
+ *
+ * This file is part of paparazzi.
+ *
+ * paparazzi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * paparazzi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with paparazzi; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA. 
+ *
+ */
+
+#ifndef ADS8344_H
+#define ADS8344_H
+
+#include "std.h"
+
+#define NB_CHANNELS 8
+
+extern uint16_t ADS8344_values[NB_CHANNELS];
+extern bool_t ADS8344_available;
+
+void ADS8344_init( void );
+void ADS8344_start( void );
+
+#endif // ADS8344_H

Copied: paparazzi3/trunk/sw/airborne/arch/lpc21/LPC2129-ROM.ld (from rev 5925, 
paparazzi3/trunk/sw/airborne/arm7/LPC2129-ROM.ld)
===================================================================
--- paparazzi3/trunk/sw/airborne/arch/lpc21/LPC2129-ROM.ld                      
        (rev 0)
+++ paparazzi3/trunk/sw/airborne/arch/lpc21/LPC2129-ROM.ld      2010-09-22 
23:23:55 UTC (rev 5926)
@@ -0,0 +1,143 @@
+/***********************************************************************/
+/*  ROM.ld:  Linker Script File                                        */
+/***********************************************************************/
+ENTRY(_boot)
+STACK_SIZE = 0x1000;
+
+/* Memory Definitions */
+MEMORY
+{
+  ROM (rx) : ORIGIN = 0x00000000, LENGTH = 256k
+  RAM (rw) : ORIGIN = 0x40000000, LENGTH = 16k
+}
+
+/* Section Definitions */
+SECTIONS
+{
+  /* first section is .text which is used for code */
+   .text :
+  {
+       /* *crt0.o (.text) */           /* Startup code */
+       KEEP(*(.init))             /* Startup code from .init-section */
+       *(.text .text.*)           /* remaining code */
+       *(.gnu.linkonce.t.*)
+       *(.glue_7)
+       *(.glue_7t)
+       *(.gcc_except_table)
+       *(.rodata)                 /* read-only data (constants) */
+       *(.rodata*)
+       *(.gnu.linkonce.r.*)
+  } > ROM
+  
+  /***** old: 
+  .text :
+  {
+    *crt0.o (.text)            
+    *(.text)                   
+    *(.rodata)                 
+    *(.rodata*)
+    *(.glue_7)
+    *(.glue_7t)
+  } > ROM 
+  *****/
+
+  . = ALIGN(4);
+  
+       /* .ctors .dtors are used for c++ constructors/destructors */
+       /* added by Martin Thomas 4/2005 based on Anglia Design example */
+       .ctors :
+       {
+               PROVIDE(__ctors_start__ = .);
+               KEEP(*(SORT(.ctors.*)))
+               KEEP(*(.ctors))
+               PROVIDE(__ctors_end__ = .);
+       } >ROM
+       
+       .dtors :
+       {
+               PROVIDE(__dtors_start__ = .); 
+               KEEP(*(SORT(.dtors.*)))
+               KEEP(*(.dtors))
+               PROVIDE(__dtors_end__ = .);
+       } >ROM
+  
+    . = ALIGN(4);
+       /* mthomas - end */
+   
+  _etext = . ;
+  PROVIDE (etext = .);
+
+  /* .data section which is used for initialized data */
+  .data : AT (_etext)
+  {
+    _data = .;
+    *(.data)
+       *(.data.*)
+       *(.gnu.linkonce.d*)
+       SORT(CONSTRUCTORS) /* mt 4/2005 */
+       . = ALIGN(4);
+       *(.fastrun) /* !!!! "RAM-Function" example */
+  } > RAM
+ 
+  . = ALIGN(4);
+  _edata = . ;
+  PROVIDE (edata = .);
+
+  /* .bss section which is used for uninitialized data */
+  .bss (NOLOAD) :
+  {
+    __bss_start = . ;
+    __bss_start__ = . ;
+    *(.bss)
+       *(.gnu.linkonce.b*)
+    *(COMMON)
+    . = ALIGN(4);
+  } > RAM
+
+  . = ALIGN(4);
+  __bss_end__ = . ;
+  PROVIDE (__bss_end = .);
+
+  .stack ALIGN(256) :
+  {
+    . += STACK_SIZE;
+    PROVIDE (_stack = .);
+  } > RAM
+
+  _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) }
+}

Copied: paparazzi3/trunk/sw/airborne/arch/lpc21/LPC2148-ROM-bl.ld (from rev 
5925, paparazzi3/trunk/sw/airborne/arm7/LPC2148-ROM-bl.ld)
===================================================================
--- paparazzi3/trunk/sw/airborne/arch/lpc21/LPC2148-ROM-bl.ld                   
        (rev 0)
+++ paparazzi3/trunk/sw/airborne/arch/lpc21/LPC2148-ROM-bl.ld   2010-09-22 
23:23:55 UTC (rev 5926)
@@ -0,0 +1,144 @@
+/***********************************************************************/
+/*  ROM.ld:  Linker Script File                                        */
+/***********************************************************************/
+ENTRY(_boot)
+STACK_SIZE = 0x1000;
+
+/* Memory Definitions */
+MEMORY
+{
+  ROM (rx) : ORIGIN = 0x00004000, LENGTH = 484k
+  RAM (rw) : ORIGIN = 0x40000000, LENGTH = 32k
+}
+
+/* Section Definitions */
+SECTIONS
+{
+  /* first section is .text which is used for code */
+   .text :
+  {
+       /* *crt0.o (.text) */           /* Startup code */
+       KEEP(*(.init))             /* Startup code from .init-section */
+       *(.text .text.*)           /* remaining code */
+       *(.gnu.linkonce.t.*)
+       *(.glue_7)
+       *(.glue_7t)
+       *(.gcc_except_table)
+       *(.rodata)                 /* read-only data (constants) */
+       *(.rodata*)
+       *(.gnu.linkonce.r.*)
+  } > ROM
+
+  /***** old:
+  .text :
+  {
+    *crt0.o (.text)
+    *(.text)
+    *(.rodata)
+    *(.rodata*)
+    *(.glue_7)
+    *(.glue_7t)
+  } > ROM
+  *****/
+
+  . = ALIGN(4);
+
+       /* .ctors .dtors are used for c++ constructors/destructors */
+       /* added by Martin Thomas 4/2005 based on Anglia Design example */
+       .ctors :
+       {
+               PROVIDE(__ctors_start__ = .);
+               KEEP(*(SORT(.ctors.*)))
+               KEEP(*(.ctors))
+               PROVIDE(__ctors_end__ = .);
+       } >ROM
+
+       .dtors :
+       {
+               PROVIDE(__dtors_start__ = .);
+               KEEP(*(SORT(.dtors.*)))
+               KEEP(*(.dtors))
+               PROVIDE(__dtors_end__ = .);
+       } >ROM
+
+    . = ALIGN(4);
+       /* mthomas - end */
+
+  _etext = . ;
+  PROVIDE (etext = .);
+
+  /* .data section which is used for initialized data */
+  .data : AT (_etext)
+  {
+    _data = .;
+    *(.data)
+       *(.data.*)
+       *(.gnu.linkonce.d*)
+       SORT(CONSTRUCTORS) /* mt 4/2005 */
+       . = ALIGN(4);
+       *(.fastrun) /* !!!! "RAM-Function" example */
+  } > RAM
+
+  . = ALIGN(4);
+  _edata = . ;
+  PROVIDE (edata = .);
+
+  /* .bss section which is used for uninitialized data */
+  .bss (NOLOAD) :
+  {
+    __bss_start = . ;
+    __bss_start__ = . ;
+    *(.bss)
+    *(.bss.*)
+       *(.gnu.linkonce.b*)
+    *(COMMON)
+    . = ALIGN(4);
+  } > RAM
+
+  . = ALIGN(4);
+  __bss_end__ = . ;
+  PROVIDE (__bss_end = .);
+
+  .stack ALIGN(256) :
+  {
+    . += STACK_SIZE;
+    PROVIDE (_stack = .);
+  } > RAM
+
+  _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) }
+}

Copied: paparazzi3/trunk/sw/airborne/arch/lpc21/LPC2148-ROM.ld (from rev 5925, 
paparazzi3/trunk/sw/airborne/arm7/LPC2148-ROM.ld)
===================================================================
--- paparazzi3/trunk/sw/airborne/arch/lpc21/LPC2148-ROM.ld                      
        (rev 0)
+++ paparazzi3/trunk/sw/airborne/arch/lpc21/LPC2148-ROM.ld      2010-09-22 
23:23:55 UTC (rev 5926)
@@ -0,0 +1,144 @@
+/***********************************************************************/
+/*  ROM.ld:  Linker Script File                                        */
+/***********************************************************************/
+ENTRY(_boot)
+STACK_SIZE = 0x1000;
+
+/* Memory Definitions */
+MEMORY
+{
+  ROM (rx) : ORIGIN = 0x00000000, LENGTH = 500k
+  RAM (rw) : ORIGIN = 0x40000000, LENGTH = 32k
+}
+
+/* Section Definitions */
+SECTIONS
+{
+  /* first section is .text which is used for code */
+   .text :
+  {
+       /* *crt0.o (.text) */           /* Startup code */
+       KEEP(*(.init))             /* Startup code from .init-section */
+       *(.text .text.*)           /* remaining code */
+       *(.gnu.linkonce.t.*)
+       *(.glue_7)
+       *(.glue_7t)
+       *(.gcc_except_table)
+       *(.rodata)                 /* read-only data (constants) */
+       *(.rodata*)
+       *(.gnu.linkonce.r.*)
+  } > ROM
+
+  /***** old:
+  .text :
+  {
+    *crt0.o (.text)
+    *(.text)
+    *(.rodata)
+    *(.rodata*)
+    *(.glue_7)
+    *(.glue_7t)
+  } > ROM
+  *****/
+
+  . = ALIGN(4);
+
+       /* .ctors .dtors are used for c++ constructors/destructors */
+       /* added by Martin Thomas 4/2005 based on Anglia Design example */
+       .ctors :
+       {
+               PROVIDE(__ctors_start__ = .);
+               KEEP(*(SORT(.ctors.*)))
+               KEEP(*(.ctors))
+               PROVIDE(__ctors_end__ = .);
+       } >ROM
+
+       .dtors :
+       {
+               PROVIDE(__dtors_start__ = .);
+               KEEP(*(SORT(.dtors.*)))
+               KEEP(*(.dtors))
+               PROVIDE(__dtors_end__ = .);
+       } >ROM
+
+    . = ALIGN(4);
+       /* mthomas - end */
+
+  _etext = . ;
+  PROVIDE (etext = .);
+
+  /* .data section which is used for initialized data */
+  .data : AT (_etext)
+  {
+    _data = .;
+    *(.data)
+       *(.data.*)
+       *(.gnu.linkonce.d*)
+       SORT(CONSTRUCTORS) /* mt 4/2005 */
+       . = ALIGN(4);
+       *(.fastrun) /* !!!! "RAM-Function" example */
+  } > RAM
+
+  . = ALIGN(4);
+  _edata = . ;
+  PROVIDE (edata = .);
+
+  /* .bss section which is used for uninitialized data */
+  .bss (NOLOAD) :
+  {
+    __bss_start = . ;
+    __bss_start__ = . ;
+    *(.bss)
+    *(.bss.*)
+       *(.gnu.linkonce.b*)
+    *(COMMON)
+    . = ALIGN(4);
+  } > RAM
+
+  . = ALIGN(4);
+  __bss_end__ = . ;
+  PROVIDE (__bss_end = .);
+
+  .stack ALIGN(256) :
+  {
+    . += STACK_SIZE;
+    PROVIDE (_stack = .);
+  } > RAM
+
+  _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) }
+}

Copied: paparazzi3/trunk/sw/airborne/arch/lpc21/adc_hw.c (from rev 5925, 
paparazzi3/trunk/sw/airborne/arm7/adc_hw.c)
===================================================================
--- paparazzi3/trunk/sw/airborne/arch/lpc21/adc_hw.c                            
(rev 0)
+++ paparazzi3/trunk/sw/airborne/arch/lpc21/adc_hw.c    2010-09-22 23:23:55 UTC 
(rev 5926)
@@ -0,0 +1,267 @@
+/*
+ * $Id$
+ *
+ * Copyright (C) 2008  Pascal Brisset, Antoine Drouin
+ *
+ * This file is part of paparazzi.
+ *
+ * paparazzi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * paparazzi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with paparazzi; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ */
+
+#include "adc.h"
+
+#include "LPC21xx.h"
+#include "armVIC.h"
+#include BOARD_CONFIG
+
+
+#ifdef USE_AD0
+#ifndef AD0_VIC_SLOT
+#define AD0_VIC_SLOT 2
+#endif
+#endif
+
+#ifdef USE_AD1
+#ifndef AD1_VIC_SLOT
+#define AD1_VIC_SLOT 4
+#endif
+#endif
+
+
+/** First NB_ADC for bank 0, others for bank 2 */
+static struct adc_buf* buffers[NB_ADC*2];
+
+volatile uint16_t adc0_val[NB_ADC] = {1,  2,  3,  4,  5,  6,  7,  8};
+volatile uint16_t adc1_val[NB_ADC] = {9, 10, 11, 12, 13, 14, 15, 16};
+
+void adcISR0 ( void ) __attribute__((naked));
+void adcISR1 ( void ) __attribute__((naked));
+
+void adc_buf_channel(uint8_t adc_channel, struct adc_buf* s, uint8_t 
av_nb_sample) {
+  buffers[adc_channel] = s;
+  s->av_nb_sample = av_nb_sample;
+}
+
+/*
+
+pin11 AD0.0  P0.27   PINSEL1 1 << 22
+pin13 AD0.1  P0.28   PINSEL1 1 << 24
+pin14 AD0.2  P0.29   PINSEL1 1 << 26
+pin15 AD0.3  P0.30   PINSEL1 1 << 28
+pin9  AD0.4  P0.25   PINSEL1 1 << 18
+pin10 AD0.5  P0.26   PINSEL1 1 << 20
+pin27 AD0.6  P0.4    PINSEL0 3 <<  8
+pin29 AD0.7  P0.5    PINSEL0 3 << 10
+
+pin30 AD1.0  P0.6    PINSEL0 3 << 12
+pin33 AD1.1  P0.8    PINSEL0 3 << 16
+pin35 AD1.2  P0.10   PINSEL0 3 << 20
+pin38 AD1.3  P0.12   PINSEL0 3 << 24
+pin39 AD1.4  P0.13   PINSEL0 3 << 26
+pin45 AD1.5  P0.15   PINSEL0 3 << 30
+pin1  AD1.6  P0.21   PINSEL1 2 << 10
+pin2  AD1.7  P0.22   PINSEL1 1 << 12
+
+*/
+
+static const uint32_t ADC_PINSEL0_ONES = 0
+#if defined USE_AD0_6
+  | 3 << 8
+#endif
+#if defined USE_AD0_7
+  | 3 << 10
+#endif
+#if defined USE_AD1_0
+  | 3 << 12
+#endif
+#if defined USE_AD1_1
+  | 3 << 16
+#endif
+#if defined USE_AD1_2
+  | 3 << 20
+#endif
+#if defined USE_AD1_3
+  | 3 << 24
+#endif
+#if defined USE_AD1_4
+  | 3 << 26
+#endif
+#if defined USE_AD1_5
+  | 3 << 30
+#endif
+;
+
+static const uint32_t ADC_PINSEL1_ONES = 0
+#if defined USE_AD0_0
+  | 1 << 22
+#endif
+#if defined USE_AD0_1
+  | 1 << 24
+#endif
+#if defined USE_AD0_2
+  | 1 << 26
+#endif
+#if defined USE_AD0_3
+  | 1 << 28
+#endif
+#if defined USE_AD0_4
+  | 1 << 18
+#endif
+#if defined USE_AD0_5
+  | 1 << 20
+#endif
+#if defined USE_AD1_6
+  | 2 << 10
+#endif
+#if defined USE_AD1_7
+  | 1 << 12
+#endif
+;
+
+static const uint32_t ADC_AD0CR_SEL_HW_SCAN = 0
+#if defined USE_AD0_0
+  | 1 << 0
+#endif
+#if defined USE_AD0_1
+  | 1 << 1
+#endif
+#if defined USE_AD0_2
+  | 1 << 2
+#endif
+#if defined USE_AD0_3
+  | 1 << 3
+#endif
+#if defined USE_AD0_4
+  | 1 << 4
+#endif
+#if defined USE_AD0_5
+  | 1 << 5
+#endif
+#if defined USE_AD0_6
+  | 1 << 6
+#endif
+#if defined USE_AD0_7
+  | 1 << 7
+#endif
+;
+
+static const uint32_t ADC_AD1CR_SEL_HW_SCAN = 0
+#if defined USE_AD1_0
+  | 1 << 0
+#endif
+#if defined USE_AD1_1
+  | 1 << 1
+#endif
+#if defined USE_AD1_2
+  | 1 << 2
+#endif
+#if defined USE_AD1_3
+  | 1 << 3
+#endif
+#if defined USE_AD1_4
+  | 1 << 4
+#endif
+#if defined USE_AD1_5
+  | 1 << 5
+#endif
+#if defined USE_AD1_6
+  | 1 << 6
+#endif
+#if defined USE_AD1_7
+  | 1 << 7
+#endif
+;
+
+void adc_init( void ) {
+
+  /* connect pins for selected ADCs */
+  PINSEL0 |= ADC_PINSEL0_ONES;
+  PINSEL1 |= ADC_PINSEL1_ONES;
+
+#ifdef USE_AD0
+  /* FIXME: this needs to be investigated, we should run just below 4.5MHz,
+                       but we are a lot slower (e.g. 58.6kHz with PCLK = 
15MHz), see
+                       lpc_vor_convertions.c for right timing code */
+  /* setup hw scan - PCLK/256 ( 58.6kHz/117.2kHz/234.4kHz ) - BURST ON */
+  AD0CR = ADC_AD0CR_SEL_HW_SCAN | 0xFF << 8 | 1 << 16 | 0x01 << 21 ;
+  /* AD0 selected as IRQ */
+  VICIntSelect &= ~VIC_BIT(VIC_AD0);
+  /* AD0 interrupt enabled */
+  VICIntEnable = VIC_BIT(VIC_AD0);
+  /* AD0 interrupt as VIC2 */
+  _VIC_CNTL(AD0_VIC_SLOT) = VIC_ENABLE | VIC_AD0;
+  _VIC_ADDR(AD0_VIC_SLOT) = (uint32_t)adcISR0;
+#endif
+
+#ifdef USE_AD1
+  /* FIXME: this needs to be investigated, we should run just below 4.5MHz,
+                       but we are a lot slower (e.g. 58.6kHz with PCLK = 
15MHz), see
+                       lpc_vor_convertions.c for right timing code */
+  /* setup hw scan - PCLK/256 ( 58.6kHz/117.2kHz/234.4kHz ) - BURST ON */
+  AD1CR = ADC_AD1CR_SEL_HW_SCAN | 0xFF << 8 | 1 << 16 | 0x01 << 21 ;
+  /* AD1 selected as IRQ */
+  VICIntSelect &= ~VIC_BIT(VIC_AD1);
+  /* AD1 interrupt enabled */
+  VICIntEnable = VIC_BIT(VIC_AD1);
+  /* AD1 interrupt as VIC2 */
+  _VIC_CNTL(AD1_VIC_SLOT) = VIC_ENABLE | VIC_AD1;
+  _VIC_ADDR(AD1_VIC_SLOT) = (uint32_t)adcISR1;
+#endif
+
+}
+
+
+void adcISR0 ( void ) {
+  ISR_ENTRY();
+  uint32_t tmp = AD0GDR;
+  uint8_t  channel = (uint8_t)(tmp >> 24) & 0x07;
+  uint16_t value = (uint16_t)(tmp >> 6) & 0x03FF;
+  adc0_val[channel] = value;
+
+  struct adc_buf* buf = buffers[channel];
+  if (buf) {
+       uint8_t new_head = buf->head + 1;
+       if (new_head >= buf->av_nb_sample) new_head = 0;
+       buf->sum -= buf->values[new_head];
+       buf->values[new_head] = value;
+       buf->sum += value;
+       buf->head = new_head;
+  }
+
+  VICVectAddr = 0x00000000;                 // clear this interrupt from the 
VIC
+  ISR_EXIT();                               // recover registers and return
+}
+
+void adcISR1 ( void ) {
+  ISR_ENTRY();
+  uint32_t tmp = AD1GDR;
+  uint8_t channel = (uint8_t)(tmp >> 24) & 0x07;
+  uint16_t value = (uint16_t)(tmp >> 6) & 0x03FF;
+  adc1_val[channel] = value;
+  struct adc_buf* buf = buffers[channel+NB_ADC];
+  if (buf) {
+       uint8_t new_head = buf->head + 1;
+       if (new_head >= buf->av_nb_sample) new_head = 0;
+       buf->sum -= buf->values[new_head];
+       buf->values[new_head] = value;
+       buf->sum += value;
+       buf->head = new_head;
+  }
+
+  VICVectAddr = 0x00000000;                 // clear this interrupt from the 
VIC
+  ISR_EXIT();                               // recover registers and return
+}

Copied: paparazzi3/trunk/sw/airborne/arch/lpc21/adc_hw.h (from rev 5925, 
paparazzi3/trunk/sw/airborne/arm7/adc_hw.h)
===================================================================
--- paparazzi3/trunk/sw/airborne/arch/lpc21/adc_hw.h                            
(rev 0)
+++ paparazzi3/trunk/sw/airborne/arch/lpc21/adc_hw.h    2010-09-22 23:23:55 UTC 
(rev 5926)
@@ -0,0 +1,31 @@
+/*
+ * $Id$
+ *  
+ * Copyright (C) 2008  Antoine Drouin
+ *
+ * This file is part of paparazzi.
+ *
+ * paparazzi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * paparazzi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with paparazzi; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA. 
+ *
+ */
+
+#ifndef ADC_HW_H
+#define ADC_HW_H
+
+#define AdcBank0(x) (x)
+#define AdcBank1(x) (x+NB_ADC)
+
+#endif /* ADC_HW_H */

Copied: paparazzi3/trunk/sw/airborne/arch/lpc21/armVIC.c (from rev 5925, 
paparazzi3/trunk/sw/airborne/arm7/armVIC.c)
===================================================================
--- paparazzi3/trunk/sw/airborne/arch/lpc21/armVIC.c                            
(rev 0)
+++ paparazzi3/trunk/sw/airborne/arch/lpc21/armVIC.c    2010-09-22 23:23:55 UTC 
(rev 5926)
@@ -0,0 +1,85 @@
+/******************************************************************************
+ *
+ * $RCSfile$
+ * $Revision$
+ *
+ * This module provides the interface routines for setting up and
+ * controlling the various interrupt modes present on the ARM processor.
+ * Copyright 2004, R O SoftWare
+ * No guarantees, warrantees, or promises, implied or otherwise.
+ * May be used for hobby or commercial purposes provided copyright
+ * notice remains intact.
+ *
+ *****************************************************************************/
+#include "types.h"
+#include "armVIC.h"
+
+#define IRQ_MASK 0x00000080
+#define FIQ_MASK 0x00000040
+#define INT_MASK (IRQ_MASK | FIQ_MASK)
+
+static inline unsigned __get_cpsr(void)
+{
+  unsigned long retval;
+  asm volatile (" mrs  %0, cpsr" : "=r" (retval) : /* no inputs */  );
+  return retval;
+}
+
+static inline void __set_cpsr(unsigned val)
+{
+  asm volatile (" msr  cpsr, %0" : /* no outputs */ : "r" (val)  );
+}
+
+unsigned disableIRQ(void)
+{
+  unsigned _cpsr;
+
+  _cpsr = __get_cpsr();
+  __set_cpsr(_cpsr | IRQ_MASK);
+  return _cpsr;
+}
+
+unsigned restoreIRQ(unsigned oldCPSR)
+{
+  unsigned _cpsr;
+
+  _cpsr = __get_cpsr();
+  __set_cpsr((_cpsr & ~IRQ_MASK) | (oldCPSR & IRQ_MASK));
+  return _cpsr;
+}
+
+unsigned enableIRQ(void)
+{
+  unsigned _cpsr;
+
+  _cpsr = __get_cpsr();
+  __set_cpsr(_cpsr & ~IRQ_MASK);
+  return _cpsr;
+}
+
+unsigned disableFIQ(void)
+{
+  unsigned _cpsr;
+
+  _cpsr = __get_cpsr();
+  __set_cpsr(_cpsr | FIQ_MASK);
+  return _cpsr;
+}
+
+unsigned restoreFIQ(unsigned oldCPSR)
+{
+  unsigned _cpsr;
+
+  _cpsr = __get_cpsr();
+  __set_cpsr((_cpsr & ~FIQ_MASK) | (oldCPSR & FIQ_MASK));
+  return _cpsr;
+}
+
+unsigned enableFIQ(void)
+{
+  unsigned _cpsr;
+
+  _cpsr = __get_cpsr();
+  __set_cpsr(_cpsr & ~FIQ_MASK);
+  return _cpsr;
+}

Copied: paparazzi3/trunk/sw/airborne/arch/lpc21/armVIC.h (from rev 5925, 
paparazzi3/trunk/sw/airborne/arm7/armVIC.h)
===================================================================
--- paparazzi3/trunk/sw/airborne/arch/lpc21/armVIC.h                            
(rev 0)
+++ paparazzi3/trunk/sw/airborne/arch/lpc21/armVIC.h    2010-09-22 23:23:55 UTC 
(rev 5926)
@@ -0,0 +1,163 @@
+/******************************************************************************
+ *
+ * $RCSfile$
+ * $Revision$
+ *
+ * This module provides the interface definitions for setting up and
+ * controlling the various interrupt modes present on the ARM processor.
+ * Copyright 2004, R O SoftWare
+ * No guarantees, warrantees, or promises, implied or otherwise.
+ * May be used for hobby or commercial purposes provided copyright
+ * notice remains intact.
+ *
+ *****************************************************************************/
+#ifndef INC_ARM_VIC_H
+#define INC_ARM_VIC_H
+
+#define __VIC_CNTL(idx)  VICVectCntl##idx
+#define __VIC_ADDR(idx)  VICVectAddr##idx
+#define _VIC_CNTL(idx)  __VIC_CNTL(idx)
+#define _VIC_ADDR(idx)  __VIC_ADDR(idx)
+
+
+/******************************************************************************
+ *
+ * MACRO Name: ISR_ENTRY()
+ *
+ * Description:
+ *    This MACRO is used upon entry to an ISR.  The current version of
+ *    the gcc compiler for ARM does not produce correct code for
+ *    interrupt routines to operate properly with THUMB code.  The MACRO
+ *    performs the following steps:
+ *
+ *    1 - Adjust address at which execution should resume after servicing
+ *        ISR to compensate for IRQ entry
+ *    2 - Save the non-banked registers r0-r12 and lr onto the IRQ stack.
+ *    3 - Get the status of the interrupted program is in SPSR.
+ *    4 - Push it onto the IRQ stack as well.
+ *
+ *****************************************************************************/
+#define ISR_ENTRY() asm volatile(" sub   lr, lr,#4\n" \
+                                 " stmfd sp!,{r0-r12,lr}\n" \
+                                 " mrs   r1, spsr\n" \
+                                 " stmfd sp!,{r1}")
+
+/******************************************************************************
+ *
+ * MACRO Name: ISR_EXIT()
+ *
+ * Description:
+ *    This MACRO is used to exit an ISR.  The current version of the gcc
+ *    compiler for ARM does not produce correct code for interrupt
+ *    routines to operate properly with THUMB code.  The MACRO performs
+ *    the following steps:
+ *
+ *    1 - Recover SPSR value from stack       
+ *    2 - and restore  its value                   
+ *    3 - Pop the return address & the saved general registers from
+ *        the IRQ stack & return
+ *
+ *****************************************************************************/
+#define ISR_EXIT()  asm volatile(" ldmfd sp!,{r1}\n" \
+                                 " msr   spsr_c,r1\n" \
+                                 " ldmfd sp!,{r0-r12,pc}^")
+
+/******************************************************************************
+ *
+ * Function Name: disableIRQ()
+ *
+ * Description:
+ *    This function sets the IRQ disable bit in the status register
+ *
+ * Calling Sequence: 
+ *    void
+ *
+ * Returns:
+ *    previous value of CPSR
+ *
+ *****************************************************************************/
+unsigned disableIRQ(void);
+
+/******************************************************************************
+ *
+ * Function Name: enableIRQ()
+ *
+ * Description:
+ *    This function clears the IRQ disable bit in the status register
+ *
+ * Calling Sequence: 
+ *    void
+ *
+ * Returns:
+ *    previous value of CPSR
+ *
+ *****************************************************************************/
+unsigned enableIRQ(void);
+
+/******************************************************************************
+ *
+ * Function Name: restoreIRQ()
+ *
+ * Description:
+ *    This function restores the IRQ disable bit in the status register
+ *    to the value contained within passed oldCPSR
+ *
+ * Calling Sequence: 
+ *    void
+ *
+ * Returns:
+ *    previous value of CPSR
+ *
+ *****************************************************************************/
+unsigned restoreIRQ(unsigned oldCPSR);
+
+/******************************************************************************
+ *
+ * Function Name: disableFIQ()
+ *
+ * Description:
+ *    This function sets the FIQ disable bit in the status register
+ *
+ * Calling Sequence: 
+ *    void
+ *
+ * Returns:
+ *    previous value of CPSR
+ *
+ *****************************************************************************/
+unsigned disableFIQ(void);
+
+/******************************************************************************
+ *
+ * Function Name: enableFIQ()
+ *
+ * Description:
+ *    This function clears the FIQ disable bit in the status register
+ *
+ * Calling Sequence: 
+ *    void
+ *
+ * Returns:
+ *    previous value of CPSR
+ *
+ *****************************************************************************/
+unsigned enableFIQ(void);
+
+/******************************************************************************
+ *
+ * Function Name: restoreIRQ()
+ *
+ * Description:
+ *    This function restores the FIQ disable bit in the status register
+ *    to the value contained within passed oldCPSR
+ *
+ * Calling Sequence: 
+ *    void
+ *
+ * Returns:
+ *    previous value of CPSR
+ *
+ *****************************************************************************/
+unsigned restoreFIQ(unsigned oldCPSR);
+
+#endif

Copied: paparazzi3/trunk/sw/airborne/arch/lpc21/baro_MS5534A.c (from rev 5925, 
paparazzi3/trunk/sw/airborne/arm7/baro_MS5534A.c)
===================================================================
--- paparazzi3/trunk/sw/airborne/arch/lpc21/baro_MS5534A.c                      
        (rev 0)
+++ paparazzi3/trunk/sw/airborne/arch/lpc21/baro_MS5534A.c      2010-09-22 
23:23:55 UTC (rev 5926)
@@ -0,0 +1,251 @@
+/*
+ * $Id$
+ *  
+ * Copyright (C) 2007  ENAC
+ *
+ * This file is part of paparazzi.
+ *
+ * paparazzi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * paparazzi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with paparazzi; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA. 
+ *
+ */
+
+/** \file baro_MS5534A.c
+ *  \brief Handling of the MS5534a pressure sensor
+ *
+ */
+
+#include "baro_MS5534A.h"
+#include "spi.h"
+#include "uart.h"
+#ifndef BARO_NO_DOWNLINK
+#include "ap_downlink.h"
+#endif
+#include "nav.h"
+
+bool_t baro_MS5534A_do_reset;
+uint32_t baro_MS5534A_pressure;
+uint16_t baro_MS5534A_temp;
+bool_t baro_MS5534A_available;
+bool_t alt_baro_enabled;
+uint32_t baro_MS5534A_ground_pressure;
+float baro_MS5534A_r;
+float baro_MS5534A_sigma2;
+float baro_MS5534A_z;
+
+
+#define STATUS_INIT1               0
+#define STATUS_INIT2               1
+#define STATUS_INIT3               2
+#define STATUS_INIT4               3
+#define STATUS_MEASURE_PRESSURE    4
+#define STATUS_MEASURE_TEMPERATURE 5
+#define STATUS_RESET               6
+
+static uint8_t status;
+static bool_t status_read_data;
+static uint16_t words[4];
+
+#define InitStatus() (status <= STATUS_INIT4)
+
+#define NextStatus() { \
+  if (status_read_data) { \
+    status++; if (status > STATUS_MEASURE_TEMPERATURE) status = 
STATUS_MEASURE_PRESSURE; \
+  }; \
+  status_read_data = !status_read_data; \
+}
+
+#define CMD_INIT        0x1D
+#define CMD_MEASUREMENT 0x0F
+
+#define CMD_W1          0x50
+#define CMD_W2          0x60
+#define CMD_W3          0x90
+#define CMD_W4          0xA0
+#define CMD_PRESSURE    0x40
+#define CMD_TEMPERATURE 0x20
+static uint8_t cmds[6] = {CMD_W1, CMD_W2, CMD_W3, CMD_W4, CMD_PRESSURE, 
CMD_TEMPERATURE};
+static uint8_t reset[3] = {0x15, 0x55, 0x40};
+
+
+
+static uint8_t buf_input[3];
+static uint8_t buf_output[3];
+
+#define Uint16(buf_input) (buf_input[0] << 8 | buf_input[1])
+
+/* PWM prescaler, set PWM input clock to 15MHz, PWM_CLK = PCLK / PWM_PRESCALER 
*/
+
+#if (PCLK == 15000000)
+#define PWM_PRESCALER   1
+#else
+
+#if (PCLK == 30000000)
+#define PWM_PRESCALER   2
+#else
+
+#if (PCLK == 60000000)
+#define PWM_PRESCALER   4
+#else
+
+#error unknown PCLK frequency
+#endif
+#endif
+#endif
+
+#define MS5534A_MCLK 32768
+#define PWM_PERIOD ((PCLK / PWM_PRESCALER) / MS5534A_MCLK)
+#define PWM_DUTY (PWM_PERIOD / 2)
+
+
+static void calibration( void );
+
+void baro_MS5534A_init( void ) {
+  /* 32768Hz on PWM2 */
+  /* Configure P0.7 pin as PWM */
+  PINSEL0 &= ~(_BV(14));
+  PINSEL0 |= _BV(15);
+
+  /* No prescaler */
+  PWMPR = PWM_PRESCALER-1;
+
+  /* To get 32768Hz from a base frequency of 15MHz */
+  PWMMR0 = PWM_PERIOD;
+  PWMMR2 = PWM_DUTY;
+
+  PWMLER = PWMLER_LATCH0 | PWMLER_LATCH2;
+  PWMTCR = PWMTCR_COUNTER_ENABLE | PWMTCR_PWM_ENABLE;
+  PWMPCR = PWMPCR_ENA2;
+
+#ifdef BARO_MS5534A_W1
+  words[0] = BARO_MS5534A_W1;
+  words[1] = BARO_MS5534A_W2;
+  words[2] = BARO_MS5534A_W3;
+  words[3] = BARO_MS5534A_W4;
+
+  status = STATUS_MEASURE_PRESSURE;
+  status_read_data = FALSE;
+
+  calibration();
+#else
+  status = STATUS_INIT1;
+  status_read_data = FALSE;
+#endif
+
+
+
+  baro_MS5534A_available = FALSE;
+  alt_baro_enabled = FALSE;
+
+  baro_MS5534A_ground_pressure = 101300;
+  baro_MS5534A_r = 20.;
+  baro_MS5534A_sigma2 = 1;
+  baro_MS5534A_do_reset = FALSE;
+}
+
+void baro_MS5534A_reset( void ) {
+  status = STATUS_INIT1;
+  status_read_data = FALSE;
+}
+
+/* To be called not faster than 30Hz */
+void baro_MS5534A_send(void) {
+  if (!SpiCheckAvailable()) {
+    SpiOverRun();
+    return;
+  }
+
+  if (status == STATUS_RESET) {
+    uint8_t i;
+    for(i = 0; i < 3; i++)
+      buf_output[i] = reset[i];
+    spi_buffer_length = 3;
+  } else {
+    if (status_read_data) {
+      buf_output[0] = buf_output[1] = 0;
+    } else {
+      buf_output[0] = (InitStatus() ? CMD_INIT : CMD_MEASUREMENT);
+      buf_output[1] = cmds[status];
+    }
+    spi_buffer_length = 2;
+  }
+
+  spi_buffer_input = (uint8_t*)&buf_input;
+  spi_buffer_output = (uint8_t*)&buf_output;
+  if (status_read_data)
+    SpiSetCPHA();
+  else
+    SpiClrCPHA();
+  SpiStart();
+}
+
+static uint16_t d1, d2;
+static uint16_t c1, c2, c3, c4, ut1, c6;
+
+
+static void calibration( void ) {
+  /* End of init, configuration (page 11) */
+  c1 = words[0] >> 1;
+  c2 = ((words[2] & 0x3f) << 6) | (words[3] & 0x3f);
+  c3 = words[3] >> 6;
+  c4 = words[2] >> 6;
+  uint16_t c5 = ((words[0] & 0x1) << 10) | (words[1] >> 6);
+  c6 = words[1] & 0x3f;
+  
+  ut1 = (c5 << 3) + 20224;
+  
+#ifndef BARO_NO_DOWNLINK
+  DOWNLINK_SEND_BARO_WORDS(DefaultChannel, &words[0], &words[1], &words[2], 
&words[3]);
+#endif
+}
+
+
+
+/* Handle the SPI message, i.e. store the received values in variables */
+void baro_MS5534A_event_task( void ) {
+  if (status_read_data) {
+    switch (status) {
+    case STATUS_MEASURE_PRESSURE:
+      d1 = Uint16(buf_input);
+      break;
+    case STATUS_MEASURE_TEMPERATURE:
+      d2 = Uint16(buf_input);
+      /* Compute pressure and temp (page 10) */
+      int16_t dT = d2 - ut1;
+      baro_MS5534A_temp = 200 + (dT*(c6+50)) / (1 << 10);
+      int16_t off = c2*4 + ((c4-512)*dT)/(1 << 12);
+      uint32_t sens = c1 + (c3*dT)/(1<<10) + 24576;
+      uint16_t x = (sens*(d1-7168))/(1<<14) - off;
+      // baro_MS5534A = ((x*10)>>5) + 250*10;
+      baro_MS5534A_pressure = ((x*100)>>5) + 250*100;
+      baro_MS5534A_available = TRUE;
+
+      break;
+     case STATUS_RESET:
+       break;
+    default: /* Init status */
+      words[status] = Uint16(buf_input);
+      if (status == STATUS_INIT4) {
+       calibration();
+      }
+    }
+  } /* else nothing to read */
+
+  NextStatus();
+  if (!status_read_data) {
+   /* Ask next conversion now */
+    baro_MS5534A_send();
+  }
+}

Copied: paparazzi3/trunk/sw/airborne/arch/lpc21/baro_MS5534A.h (from rev 5925, 
paparazzi3/trunk/sw/airborne/arm7/baro_MS5534A.h)
===================================================================
--- paparazzi3/trunk/sw/airborne/arch/lpc21/baro_MS5534A.h                      
        (rev 0)
+++ paparazzi3/trunk/sw/airborne/arch/lpc21/baro_MS5534A.h      2010-09-22 
23:23:55 UTC (rev 5926)
@@ -0,0 +1,58 @@
+/*
+ * $Id$
+ *  
+ * Copyright (C) 2007  ENAC
+ *
+ * This file is part of paparazzi.
+ *
+ * paparazzi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * paparazzi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with paparazzi; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA. 
+ *
+ */
+
+/** \file baro_MS5534A.h
+ *  \brief Handling of the MS5534a pressure sensor
+ *
+ */
+
+#ifndef BARO_MS5534A_H
+#define BARO_MS5534A_H
+
+#include "std.h"
+
+#ifdef USE_BARO_MS5534A
+
+extern bool_t baro_MS5534A_do_reset;
+extern bool_t baro_MS5534A_available;
+extern uint32_t baro_MS5534A_pressure;
+extern uint16_t baro_MS5534A_temp;
+extern bool_t alt_baro_enabled;
+extern uint32_t baro_MS5534A_ground_pressure;
+extern float baro_MS5534A_r;
+extern float baro_MS5534A_sigma2;
+extern float baro_MS5534A_z;
+
+void baro_MS5534A_init(void);
+void baro_MS5534A_reset(void);
+
+/* To be called not faster than 30Hz */
+void baro_MS5534A_send(void);
+
+/* Set baro_MS5534A_available when pressure and temp are readable */
+void baro_MS5534A_event_task( void );
+
+#endif // USE_BARO_MS5534A
+
+#endif // BARO_MS5534A_H

Copied: paparazzi3/trunk/sw/airborne/arch/lpc21/crt0.S (from rev 5925, 
paparazzi3/trunk/sw/airborne/arm7/crt0.S)
===================================================================
--- paparazzi3/trunk/sw/airborne/arch/lpc21/crt0.S                              
(rev 0)
+++ paparazzi3/trunk/sw/airborne/arch/lpc21/crt0.S      2010-09-22 23:23:55 UTC 
(rev 5926)
@@ -0,0 +1,220 @@
+/* 
+ crt0.S for LPC2xxx
+ - based on examples from R O Software
+ - based on examples from newlib-lpc
+ - based on an example from Anglia Designs
+
+ collected and modified by Martin Thomas
+*/
+
+        .global _etext                  // -> .data initial values in ROM
+        .global _data                   // -> .data area in RAM
+        .global _edata                  // end of .data area
+        .global __bss_start             // -> .bss area in RAM
+        .global __bss_end__             // end of .bss area
+        .global _stack                  // top of stack
+
+// Stack Sizes
+        .set  UND_STACK_SIZE, 0x00000004
+        .set  ABT_STACK_SIZE, 0x00000004
+        .set  FIQ_STACK_SIZE, 0x00000004
+        .set  IRQ_STACK_SIZE, 0X00000080
+        .set  SVC_STACK_SIZE, 0x00000004
+
+// Standard definitions of Mode bits and Interrupt (I & F) flags in PSRs
+        .set  MODE_USR, 0x10            // User Mode
+        .set  MODE_FIQ, 0x11            // FIQ Mode
+        .set  MODE_IRQ, 0x12            // IRQ Mode
+        .set  MODE_SVC, 0x13            // Supervisor Mode
+        .set  MODE_ABT, 0x17            // Abort Mode
+        .set  MODE_UND, 0x1B            // Undefined Mode
+        .set  MODE_SYS, 0x1F            // System Mode
+
+        .equ  I_BIT, 0x80               // when I bit is set, IRQ is disabled
+        .equ  F_BIT, 0x40               // when F bit is set, FIQ is disabled
+
+        .text
+       .arm
+       .section .init, "ax"
+
+        .code 32
+        .align 2
+
+        .global _boot
+        .func   _boot
+_boot:
+
+// Runtime Interrupt Vectors
+// -------------------------
+Vectors:
+        b     _start                    // reset - _start
+        ldr   pc,_undf                  // undefined - _undf
+        ldr   pc,_swi                   // SWI - _swi
+        ldr   pc,_pabt                  // program abort - _pabt
+        ldr   pc,_dabt                  // data abort - _dabt
+        nop                             // reserved
+        ldr   pc,[pc,#-0xFF0]           // IRQ - read the VIC
+        ldr   pc,_fiq                   // FIQ - _fiq
+
+#if 0
+// Use this group for production
+_undf:  .word _reset                    // undefined - _reset
+_swi:   .word _reset                    // SWI - _reset
+_pabt:  .word _reset                    // program abort - _reset
+_dabt:  .word _reset                    // data abort - _reset
+_irq:   .word _reset                    // IRQ - _reset
+_fiq:   .word _reset                    // FIQ - _reset
+
+#else
+// Use this group for development
+_undf:  .word __undf                    // undefined
+_swi:   .word __swi                     // SWI
+_pabt:  .word __pabt                    // program abort
+_dabt:  .word __dabt                    // data abort
+_irq:   .word __irq                     // IRQ
+_fiq:   .word __fiq                     // FIQ
+
+__undf: b     .                         // undefined
+__swi:  b     .                         // SWI
+__pabt: b     .                         // program abort
+__dabt: b     .                         // data abort
+__irq:  b     .                         // IRQ
+__fiq:  b     .                         // FIQ
+#endif
+        .size _boot, . - _boot
+        .endfunc
+
+
+// Setup the operating mode & stack.
+// ---------------------------------
+        .global _start, start, _mainCRTStartup
+        .func   _start
+
+_start:
+start:
+_mainCRTStartup:
+
+// Initialize Interrupt System
+// - Set stack location for each mode
+// - Leave in System Mode with Interrupts Disabled
+// -----------------------------------------------
+        ldr   r0,=_stack
+        msr   CPSR_c,#MODE_UND|I_BIT|F_BIT // Undefined Instruction Mode
+        mov   sp,r0
+        sub   r0,r0,#UND_STACK_SIZE
+        msr   CPSR_c,#MODE_ABT|I_BIT|F_BIT // Abort Mode
+        mov   sp,r0
+        sub   r0,r0,#ABT_STACK_SIZE
+        msr   CPSR_c,#MODE_FIQ|I_BIT|F_BIT // FIQ Mode
+        mov   sp,r0
+        sub   r0,r0,#FIQ_STACK_SIZE
+        msr   CPSR_c,#MODE_IRQ|I_BIT|F_BIT // IRQ Mode
+        mov   sp,r0
+        sub   r0,r0,#IRQ_STACK_SIZE
+        msr   CPSR_c,#MODE_SVC|I_BIT|F_BIT // Supervisor Mode
+        mov   sp,r0
+        sub   r0,r0,#SVC_STACK_SIZE
+        msr   CPSR_c,#MODE_SYS|I_BIT|F_BIT // System Mode
+        mov   sp,r0
+
+// Copy initialized data to its execution address in RAM
+// -----------------------------------------------------
+//#ifdef ROM_RUN
+        ldr   r1,=_etext                // -> ROM data start
+        ldr   r2,=_data                 // -> data start
+        ldr   r3,=_edata                // -> end of data
+1:      cmp   r2,r3                     // check if data to move
+        ldrlo r0,[r1],#4                // copy it
+        strlo r0,[r2],#4
+        blo   1b                        // loop until done
+//#endif
+// Clear .bss
+// ----------
+        mov   r0,#0                     // get a zero
+        ldr   r1,=__bss_start           // -> bss start
+        ldr   r2,=__bss_end__           // -> bss end
+2:      cmp   r1,r2                     // check if data to clear
+        strlo r0,[r1],#4                // clear 4 bytes
+        blo   2b                        // loop until done
+               
+/*
+   Call C++ constructors (for objects in "global scope")
+   ctor loop added by Martin Thomas 4/2005 
+   based on a Anglia Design example-application for ST ARM
+*/
+
+               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
+               LDMFD   sp!, {r0-r1}
+               B               ctor_loop
+ctor_end:
+
+// Call main program: main(0)
+// --------------------------
+        mov   r0,#0                     // no arguments (argc = 0)
+        mov   r1,r0
+        mov   r2,r0
+        mov   fp,r0                     // null frame pointer
+        mov   r7,r0                     // null frame pointer for thumb
+        ldr   r10,=main
+        mov   lr,pc
+
+/* Enter the C code, use BX instruction so as to never return */
+/* use BLX (?) main if you want to use c++ destructors below */
+
+        bx    r10                       // enter main()
+
+/* "global object"-dtors are never called and it should not be 
+   needed since there is no OS to exit to. */
+/* Call destructors */
+#              LDR             r0, =__dtors_start__
+#              LDR             r1, =__dtors_end__
+dtor_loop:
+#              CMP             r0, r1
+#              BEQ             dtor_end
+#              LDR             r2, [r0], #4
+#              STMFD   sp!, {r0-r1}
+#              MOV             lr, pc
+#              MOV             pc, r2
+#              LDMFD   sp!, {r0-r1}
+#              B               dtor_loop
+dtor_end:
+   
+        .size   _start, . - _start
+        .endfunc
+
+        .global _reset, reset, exit, abort
+        .func   _reset
+_reset:
+reset:
+exit:
+abort:
+#if 0
+// Disable interrupts, then force a hardware reset by driving P23 low
+// -------------------------------------------------------------------
+        mrs   r0,cpsr                   // get PSR
+        orr   r0,r0,#I_BIT|F_BIT        // disable IRQ and FIQ
+        msr   cpsr,r0                   // set up status register
+
+        ldr   r1,=(PS_BASE)             // PS Base Address
+        ldr   r0,=(PS_PIO)              // PIO Module
+        str   r0,[r1,#PS_PCER_OFF]      // enable its clock
+        ldr   r1,=(PIO_BASE)            // PIO Base Address
+        ldr   r0,=(1<<23)               // P23
+        str   r0,[r1,#PIO_PER_OFF]      // make sure pin is contolled by PIO
+        str   r0,[r1,#PIO_CODR_OFF]     // set the pin low
+        str   r0,[r1,#PIO_OER_OFF]      // make it an output
+#endif
+        b     .                         // loop until reset
+
+        .size _reset, . - _reset
+        .endfunc
+
+        .end

Copied: paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/conf/config.h (from rev 
5925, paparazzi3/trunk/sw/airborne/arm7/efsl/conf/config.h)
===================================================================
--- paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/conf/config.h                  
        (rev 0)
+++ paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/conf/config.h  2010-09-22 
23:23:55 UTC (rev 5926)
@@ -0,0 +1,146 @@
+#ifndef __EFSL_CONFIG_H__
+#define __EFSL_CONFIG_H__
+
+/* This is for the LPC2000 SD-Card SPI interface (M. Thomas) */
+
+
+/* Hardware target
+   ---------------
+
+ * Here you will define for what hardware-endpoint EFSL should be compiled.
+ * Look in interfaces.h to see what systems are supported, and add your own
+ * there if you need to write your own driver. Then, define the name you 
+ * selected for your hardware there here. Make sure that you only select one
+ * device!
+*/
+
+       /*#define HW_ENDPOINT_LINUX*/
+       /*#define HW_ENDPOINT_ATMEGA128_SD*/
+
+
+       #define HW_ENDPOINT_LPC2000_SD
+       /* defines the interface for LPC213x (0=SPI0 1=SPI1) */
+       //#define HW_ENDPOINT_LPC2000_SPINUM  (0)
+       //#define HW_ENDPOINT_LPC2000_SPINUM  (1)
+       
+       /*#define HW_ENDPOINT_DSP_TI6713_SD*/
+
+
+/* Memory configuration
+   --------------------
+ 
+ * Here you must configure wheter your processor can access memory byte
+ * oriented. All x86 processors can do it, AVR's can do it to. Some DSP
+ * or other microcontrollers can't. If you have an 8 bit system you're safe.
+ * If you are really unsure, leave the setting commented out, it will be slower
+ * but it will work for sure.
+*/
+
+       /* disabled for ARM (mt): #define BYTE_ALIGNMENT */
+
+/* Cache configuration
+   -------------------
+   
+ * Here you must configure how much memory of cache you can/want to use.
+ * The number you put at IOMAN_NUMBUFFER is multiplied by 512. So 1 means 
+ * 512 bytes cache, 4 means 2048 bytes cache. More is better.
+ * The number after IOMAN_NUMITERATIONS should be untouched.
+ * The last field (IOMAN_DO_MEMALLOC) is to tell ioman to allocate it's
+ * own memory in it's structure, or not. If you choose to do it yourself
+ * you will have to pass a pointer to the memory as the last argument of
+ * ioman_init.
+*/
+       /*#define IOMAN_NUMBUFFER 1*/
+       #define IOMAN_NUMBUFFER 6 /* 32kB RAM on the LPC2138 - let's use 3 kB */
+       #define IOMAN_NUMITERATIONS 3
+       #define IOMAN_DO_MEMALLOC
+
+/* Cluster pre-allocation 
+   ----------------------
+   
+ * When writing files, the function that performs the actual write has to
+ * calculate how many clusters it will need for that request. It then allocates
+ * that number of new clusters to the file. Since this involves some 
calculations
+ * and writing of the FAT, you might find it beneficial to limit the number of
+ * allocations, and allow fwrite to pre-allocate a number of clusters extra.
+ * This setting determines how many clusters will be extra allocated whenever
+ * this is required.
+ * Take in carefull consideration how large your clustersize is, putting 10 
here
+ * with a clustersize of 32kb means you might waste 320 kb.
+ * The first option is for preallocating files, the other is used when 
enlarging
+ * a directory to accomodate more files
+*/
+      /*#define CLUSTER_PREALLOC_FILE 0*/
+         #define CLUSTER_PREALLOC_FILE 2
+      #define CLUSTER_PREALLOC_DIRECTORY 0
+
+
+/* Endianess configuration
+   -----------------------
+   
+ * Here you can configure wheter your architecture is little or big endian. 
This
+ * is important since all FAT structures are stored in intel little endian 
order.
+ * So if you have a big endian system the library has to convert all figures to
+ * big endian in order to work.
+ */
+       #define LITTLE_ENDIAN
+       
+
+/* Date and Time support
+   ---------------------
+   
+ * Here you can enable or disable date and time support. If you enable
+ * it you will have to create 6 functions, that are described in the
+ * EFSL manual. If the functions are not present when linking your
+ * program with the library you will get unresolved dependencies.
+ */
+       /*#define DATE_TIME_SUPPORT*/
+               
+/* Error reporting support
+   -----------------------
+   
+ * When you receive an error in userland, it usually only gives limited
+ * information (most likely, fail or success). If error detection and
+ * reporting is important for you, you can enable more detailed error
+ * reporting here. This is optional, the costs are 1 byte per object,
+ * and a small increase in code size.
+ * You can enable error recording for all object, or you can select the
+ * object manually.
+ * For full error reporting use FULL_ERROR_SUPPORT
+ * For only the base-core of the library use BASE_ERROR_SUPPORT
+ * For IO/Man use ERRSUP_IOMAN
+ * For Disc   use ERRSUP_IOMAN
+ * For Part   use ERRSUP_PARTITION
+ * For Fs     use ERRSUP_FILESYSTEM
+ * For File   use ERRSUP_FILE
+*/
+
+       #define FULL_ERROR_SUPPORT
+       /*#define BASE_ERROR_SUPPORT*/
+
+/* List options 
+   ------------
+   
+ * In this section youcan configure what kind of data you will get from
+ * directory listing requests. Please refer to the documentation for
+ * more information
+*/
+
+#define LIST_MAXLENFILENAME 12
+
+
+
+
+/* Debugging configuration
+   -----------------------
+   
+ * Here you can configure the debugging behaviour. Debugging is different
+ * on every platform (see debug.h for more information). 
+ * If your hardware has no means of output (printf) dont define any anything, 
+ * and nothing will happen. For real world use debugging should be turned off.
+*/
+
+       #define DEBUG_
+
+
+#endif

Copied: paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/debug.h (from rev 
5925, paparazzi3/trunk/sw/airborne/arm7/efsl/inc/debug.h)
===================================================================
--- paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/debug.h                    
        (rev 0)
+++ paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/debug.h    2010-09-22 
23:23:55 UTC (rev 5926)
@@ -0,0 +1,128 @@
+/*****************************************************************************\
+*              efs - General purpose Embedded Filesystem library              *
+*          ---------------------------------------------------------          *
+*                                                                             *
+* Filename : debug.h                                                          *
+* Description : Headerfile for debug.c                                        *
+*                                                                             *
+* This program is free software; you can redistribute it and/or               *
+* modify it under the terms of the GNU General Public License                 *
+* as published by the Free Software Foundation; version 2                     *
+* of the License.                                                             *
+                                                                              *
+* This program is distributed in the hope that it will be useful,             *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of              *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               *
+* GNU General Public License for more details.                                *
+*                                                                             *
+* As a special exception, if other files instantiate templates or             *
+* use macros or inline functions from this file, or you compile this          *
+* file and link it with other works to produce a work based on this file,     *
+* this file does not by itself cause the resulting work to be covered         *
+* by the GNU General Public License. However the source code for this         *
+* file must still be made available in accordance with section (3) of         *
+* the GNU General Public License.                                             *
+*                                                                             *
+* This exception does not invalidate any other reasons why a work based       *
+* on this file might be covered by the GNU General Public License.            *
+*                                                                             *
+*                                                    (c)2006 Lennart Yseboodt *
+*                                                    (c)2006 Michael De Nil   *
+\*****************************************************************************/
+
+/* Contributions
+ *                               LPC2000 ARM7 Interface (c)2005 Martin Thomas *
+ */
+
+#ifndef __DEBUG_H__
+#define __DEBUG_H__
+
+/*****************************************************************************/
+#include "types.h"
+#include "config.h"
+/*****************************************************************************/
+
+#ifndef DEBUG
+       #define TXT(x) ;
+       #define DBG(x) ;
+       #define FUNC_IN(x) ;
+       #define FUNC_OUT(x) ;
+#endif
+
+#ifdef DEBUG
+       #if defined(HW_ENDPOINT_LINUX) || defined(HW_ENDPOINT_LINUX64)
+           #define HW_ENDPOINT_LINUX_ALL       
+       #endif
+
+       #ifdef HW_ENDPOINT_ATMEGA128_SD
+               #include <avr/io.h>
+               #include <compat/ina90.h>
+               #include <avr/pgmspace.h>
+               #include <stdio.h>
+
+               #define TXT(x) PSTR(x)
+               #define DBG(x) debug x
+               #define FUNC_IN(x) ;
+               #define FUNC_OUT(x) ;
+       #endif
+
+       #ifdef HW_ENDPOINT_LINUX_ALL
+               #include <stdio.h>
+               #include <stdarg.h>
+       
+               #define TXT(x) x
+               #define DBG(x) debug x
+               #define FUNC_IN(x) debug_funcin(x)
+               #define FUNC_OUT(x) debug_funcout(x)
+       #endif
+
+       #ifdef HW_ENDPOINT_DSP_TI6713_SD
+               #include <stdio.h>
+               #include <stdarg.h>
+
+               #define TXT(x) x
+               #define DBG(x) printf x
+               #define FUNC_IN(x) ;
+               #define FUNC_OUT(x) ;
+       #endif
+       #ifdef HW_ENDPOINT_NIOS_2_SD
+               #include <stdio.h>
+               #include <stdarg.h>
+
+               #define TXT(x) x
+               #define DBG(x) printf x
+               #define FUNC_IN(x) ;
+               #define FUNC_OUT(x) ;
+       #endif
+       #ifdef HW_ENDPOINT_LPC2000_SD
+               #include "interfaces/lpc2000_dbg_printf.h"
+               
+               #define TXT(x) x
+               #define DBG(x) debug x
+               #define FUNC_IN(x) ;
+               #define FUNC_OUT(x) ;
+               #define debug lpc2000_debug_printf
+       #else
+       void debug(const eint8 *format, ...); /* This is messy FIXME */
+       #endif
+
+       void debug_init();
+       void debug_end();
+
+       #ifdef HW_ENDPOINT_LINUX_ALL
+       FILE* debugfile;
+       volatile euint8 tw;
+       void debug_funcin(const eint8 *format, ...);
+       void debug_funcout(const eint8 *format, ...);
+       euint8 debug_getByte();
+       euint8 debug_getString(euint8 *data,euint16 length);
+       #endif
+
+       #ifdef HW_ENDPOINT_ATMEGA128_SD
+       void debug_initUART(euint16 baudrate );
+       void debug_sendByte(euint8 data );
+       #endif
+
+#endif
+
+#endif

Copied: paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/dir.h (from rev 5925, 
paparazzi3/trunk/sw/airborne/arm7/efsl/inc/dir.h)
===================================================================
--- paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/dir.h                      
        (rev 0)
+++ paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/dir.h      2010-09-22 
23:23:55 UTC (rev 5926)
@@ -0,0 +1,84 @@
+/*****************************************************************************\
+*              efs - General purpose Embedded Filesystem library              *
+*          --------------------- -----------------------------------          *
+*                                                                             *
+* Filename : dir.h                                                            *
+* Description : Headerfile for dir.c The files are an extend of the fs.c fs.h *
+*               pair.                                                         *
+*                                                                             *
+* This program is free software; you can redistribute it and/or               *
+* modify it under the terms of the GNU General Public License                 *
+* as published by the Free Software Foundation; version 2                     *
+* of the License.                                                             *
+                                                                              *
+* This program is distributed in the hope that it will be useful,             *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of              *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               *
+* GNU General Public License for more details.                                *
+*                                                                             *
+* As a special exception, if other files instantiate templates or             *
+* use macros or inline functions from this file, or you compile this          *
+* file and link it with other works to produce a work based on this file,     *
+* this file does not by itself cause the resulting work to be covered         *
+* by the GNU General Public License. However the source code for this         *
+* file must still be made available in accordance with section (3) of         *
+* the GNU General Public License.                                             *
+*                                                                             *
+* This exception does not invalidate any other reasons why a work based       *
+* on this file might be covered by the GNU General Public License.            *
+*                                                                             *
+*                                                    (c)2006 Lennart Yseboodt *
+*                                                    (c)2006 Michael De Nil   *
+\*****************************************************************************/
+
+#ifndef __DDIR_H__
+#define __DDIR_H__
+
+/*****************************************************************************/
+#include "config.h"
+#include "error.h"
+#include "fat.h"
+#include "plibc.h"
+#include "types.h"
+#include "ioman.h"
+#include "time.h"
+#include "fs.h"
+/*****************************************************************************/
+
+#define ATTR_READ_ONLY  0x01
+#define ATTR_HIDDEN     0x02
+#define ATTR_SYSTEM     0x04
+#define ATTR_VOLUME_ID  0x08
+#define ATTR_DIRECTORY  0x10
+#define ATTR_ARCHIVE    0x20
+
+#define OFFSET_DE_FILENAME            0
+#define OFFSET_DE_ATTRIBUTE          11
+#define OFFSET_DE_NTRESERVED         12
+#define OFFSET_DE_CRTIMETNT          13
+#define OFFSET_DE_CREATETIME         14
+#define OFFSET_DE_CREATEDATE         16
+#define OFFSET_DE_LASTACCESSDATE     18
+#define OFFSET_DE_FIRSTCLUSTERHIGH   20
+#define OFFSET_DE_WRITETIME          22
+#define OFFSET_DE_WRITEDATE          24
+#define OFFSET_DE_FIRSTCLUSTERLOW    26
+#define OFFSET_DE_FILESIZE           28
+
+#define DIRFIND_FILE 0
+#define DIRFIND_FREE 1
+
+void dir_getFileStructure(FileSystem *fs,FileRecord *filerec,FileLocation 
*loc);
+void dir_createDirectoryEntry(FileSystem *fs,FileRecord *filerec,FileLocation 
*loc);
+void dir_createDefaultEntry(FileSystem *fs,FileRecord *filerec,eint8* 
fatfilename);
+void dir_setFirstCluster(FileSystem *fs,FileLocation *loc,euint32 
cluster_addr);
+void dir_setFileSize(FileSystem *fs,FileLocation *loc,euint32 numbytes);
+euint32 dir_findinRoot(FileSystem *fs,eint8 * fatname, FileLocation *loc);
+euint32 dir_findinDir(FileSystem *fs, eint8 * fatname, euint32 startCluster, 
FileLocation *loc, euint8 mode);
+euint32 dir_findinBuf(euint8 *buf,eint8 *fatname, FileLocation *loc, euint8 
mode);
+euint32 dir_findinCluster(FileSystem *fs,euint32 cluster,eint8 *fatname, 
FileLocation *loc, euint8 mode);
+euint32 dir_findinRootArea(FileSystem *fs,eint8* fatname, FileLocation *loc, 
euint8 mode);
+esint8 dir_getFatFileName(eint8* filename, eint8* fatfilename);
+esint8 dir_updateDirectoryEntry(FileSystem *fs,FileRecord *entry,FileLocation 
*loc);
+esint8 dir_addCluster(FileSystem *fs,euint32 firstCluster);
+#endif

Copied: paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/disc.h (from rev 5925, 
paparazzi3/trunk/sw/airborne/arm7/efsl/inc/disc.h)
===================================================================
--- paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/disc.h                     
        (rev 0)
+++ paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/disc.h     2010-09-22 
23:23:55 UTC (rev 5926)
@@ -0,0 +1,88 @@
+/*****************************************************************************\
+*              efs - General purpose Embedded Filesystem library              *
+*          --------------------- -----------------------------------          *
+*                                                                             *
+* Filename : disc.h                                                           *
+* Description : This is the header file for disc.c                            *
+*                                                                             *
+*                                                                             *
+* This program is free software; you can redistribute it and/or               *
+* modify it under the terms of the GNU General Public License                 *
+* as published by the Free Software Foundation; version 2                     *
+* of the License.                                                             *
+                                                                              *
+* This program is distributed in the hope that it will be useful,             *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of              *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               *
+* GNU General Public License for more details.                                *
+*                                                                             *
+* As a special exception, if other files instantiate templates or             *
+* use macros or inline functions from this file, or you compile this          *
+* file and link it with other works to produce a work based on this file,     *
+* this file does not by itself cause the resulting work to be covered         *
+* by the GNU General Public License. However the source code for this         *
+* file must still be made available in accordance with section (3) of         *
+* the GNU General Public License.                                             *
+*                                                                             *
+* This exception does not invalidate any other reasons why a work based       *
+* on this file might be covered by the GNU General Public License.            *
+*                                                                             *
+*                                                    (c)2006 Lennart Yseboodt *
+*                                                    (c)2006 Michael De Nil   *
+\*****************************************************************************/
+
+#ifndef __DISC_H_
+#define __DISC_H_
+
+/*****************************************************************************/
+#include "config.h"
+#include "error.h"
+#include "interface.h"
+#include "ioman.h"
+#include "types.h"
+#include "debug.h"
+/*****************************************************************************/
+
+#define LBA_ADDR_MBR 0
+#define PARTITION_TABLE_OFFSET 0x1BE
+
+/**********************************************************\
+           PartitionField
+            ------------
+* uchar        type            Type of partition
+* ulong                LBA_begin       LBA address of first sector.
+* ulong                numSectors      Number of 512byte sectors
+This structure is a literal representation of a 16 byte
+partitionfield. Direct I/O is possible.
+\**********************************************************/
+struct PartitionField{
+       euint8 bootFlag;
+       euint8 CHS_begin[3];
+       euint8 type;
+       euint8 CHS_end[3];
+       euint32 LBA_begin;
+       euint32 numSectors;
+};
+typedef struct  PartitionField  PartitionField;
+
+#define SIZE_PARTITION_FIELD 16
+
+/***************************************************************************************\
+              Disc     
+               --      
+* CompactFlash*        sourcedisc              Pointer to the hardwareobject 
that this disc is on.
+* PartitionField* partitions   Array of PartitionFields, containing the 
partition info
+\***************************************************************************************/
+struct Disc{
+       IOManager *ioman;
+       DISC_ERR_EUINT8
+       PartitionField partitions[4];
+};
+typedef struct Disc Disc;
+
+void disc_initDisc(Disc *disc,IOManager *ioman);
+void disc_loadMBR(Disc *disc);
+
+#include "extract.h"
+
+#endif

Copied: paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/efs.h (from rev 5925, 
paparazzi3/trunk/sw/airborne/arm7/efsl/inc/efs.h)
===================================================================
--- paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/efs.h                      
        (rev 0)
+++ paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/efs.h      2010-09-22 
23:23:55 UTC (rev 5926)
@@ -0,0 +1,63 @@
+/*****************************************************************************\
+*              efs - General purpose Embedded Filesystem library              *
+*          --------------------- -----------------------------------          *
+*                                                                             *
+* Filename : efs.h                                                            *
+* Description : Headerfile for efs.c                                          *
+*                                                                             *
+* This program is free software; you can redistribute it and/or               *
+* modify it under the terms of the GNU General Public License                 *
+* as published by the Free Software Foundation; version 2                     *
+* of the License.                                                             *
+                                                                              *
+* This program is distributed in the hope that it will be useful,             *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of              *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               *
+* GNU General Public License for more details.                                *
+*                                                                             *
+* As a special exception, if other files instantiate templates or             *
+* use macros or inline functions from this file, or you compile this          *
+* file and link it with other works to produce a work based on this file,     *
+* this file does not by itself cause the resulting work to be covered         *
+* by the GNU General Public License. However the source code for this         *
+* file must still be made available in accordance with section (3) of         *
+* the GNU General Public License.                                             *
+*                                                                             *
+* This exception does not invalidate any other reasons why a work based       *
+* on this file might be covered by the GNU General Public License.            *
+*                                                                             *
+*                                                    (c)2006 Lennart Yseboodt *
+*                                                    (c)2006 Michael De Nil   *
+\*****************************************************************************/
+
+#ifndef __EFS_H__
+#define __EFS_H__
+
+/*****************************************************************************/
+#include "types.h"
+#include "config.h"
+#include "interface.h"
+#include "disc.h"
+#include "partition.h"
+#include "fs.h"
+#include "file.h"
+#include "time.h"
+#include "ui.h"
+/*****************************************************************************/
+
+typedef File EmbeddedFile;
+
+struct EmbeddedFileSystem{
+       hwInterface myCard;
+       IOManager myIOman;
+       Disc myDisc;
+       Partition myPart;
+       FileSystem myFs;
+};
+typedef struct  EmbeddedFileSystem EmbeddedFileSystem;
+
+esint8 efs_init(EmbeddedFileSystem * efs,eint8 * opts);
+
+
+#endif
+

Copied: paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/error.h (from rev 
5925, paparazzi3/trunk/sw/airborne/arm7/efsl/inc/error.h)
===================================================================
--- paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/error.h                    
        (rev 0)
+++ paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/error.h    2010-09-22 
23:23:55 UTC (rev 5926)
@@ -0,0 +1,123 @@
+/*****************************************************************************\
+*              efs - General purpose Embedded Filesystem library              *
+*          --------------------- -----------------------------------          *
+*                                                                             *
+* Filename : error.h                                                          *
+* Description : Header file containing error-defines.                         *
+*                                                                             *
+* This program is free software; you can redistribute it and/or               *
+* modify it under the terms of the GNU General Public License                 *
+* as published by the Free Software Foundation; version 2                     *
+* of the License.                                                             *
+                                                                              *
+* This program is distributed in the hope that it will be useful,             *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of              *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               *
+* GNU General Public License for more details.                                *
+*                                                                             *
+* As a special exception, if other files instantiate templates or             *
+* use macros or inline functions from this file, or you compile this          *
+* file and link it with other works to produce a work based on this file,     *
+* this file does not by itself cause the resulting work to be covered         *
+* by the GNU General Public License. However the source code for this         *
+* file must still be made available in accordance with section (3) of         *
+* the GNU General Public License.                                             *
+*                                                                             *
+* This exception does not invalidate any other reasons why a work based       *
+* on this file might be covered by the GNU General Public License.            *
+*                                                                             *
+*                                                    (c)2006 Lennart Yseboodt *
+*                                                    (c)2006 Michael De Nil   *
+\*****************************************************************************/
+#ifndef __ERROR_H_
+#define __ERROR_H_
+
+/*****************************************************************************/
+#include "config.h"
+#include "interface.h"
+/*****************************************************************************/
+
+#if defined (FULL_ERROR_SUPPORT)
+       #define ERRSUP_IOMAN
+       #define ERRSUP_DISC
+       #define ERRSUP_PARTITION
+       #define ERRSUP_FAT_FILESYSTEM
+       #define ERRSUP_FAT_FILESYSTEM
+#elif defined (BASE_ERROR_SUPPORT)
+       #define ERRSUP_IOMAN
+       #define ERRSUP_DISC
+       #define ERRSUP_PARTITION
+#endif
+
+#if defined (HWINT_HAS_ERROR_SUPPORT) && defined (INTERFACE_ERROR_SUPPORT)
+       #define ERRSUP_HWINTERFACE
+#endif
+
+#ifdef ERRSUP_IOMAN
+       #define IOMAN_ERR_EUINT8 euint8 error;
+       #define ioman_setError(ioman,errval) ioman->error = errval
+       #define ioman_getError(ioman)        ioman->error
+#else
+       #define IOMAN_ERR_EUINT8 
+       #define ioman_setError(ioman,errval) 
+       #define ioman_getError(ioman) 0
+#endif
+
+#ifdef ERRSUP_DISC
+       #define DISC_ERR_EUINT8 euint8 error;
+       #define disc_setError(disc,errval) disc->error = errval
+       #define disc_getError(disc)        disc->error
+#else
+       #define DISC_ERR_EUINT8 
+       #define disc_setError(disc,errval) 
+       #define disc_getError(disc) 0
+#endif
+
+#ifdef ERRSUP_PART
+       #define PART_ERR_EUINT8 euint8 error;
+       #define part_setError(part,errval) part->error = errval
+       #define part_getError(part)        part->error
+#else
+       #define PART_ERR_EUINT8 
+       #define part_setError(part,errval) 
+       #define part_getError(part) 0
+#endif
+
+#ifdef ERRSUP_FAT_FILESYSTEM
+       #define FILESYSTEM_ERR_EUINT8 euint8 error;
+       #define fs_setError(fs,errval) fs->error = errval
+       #define fs_getError(fs)        fs->error
+#else
+       #define FILESYSTEM_ERR_EUINT8 
+       #define fs_setError(fs,errval) 
+       #define fs_getError(fs) 0
+#endif
+
+#ifdef ERRSUP_FILE
+       #define FILE_ERR_EUINT8 euint8 error;
+       #define file_setError(file,errval) file->error = errval
+       #define file_getError(file)        file->error
+#else
+       #define FILE_ERR_EUINT8 
+       #define file_setError(file,errval) 
+       #define file_getError(file) 0
+#endif
+
+#define IOMAN_NOERROR                     0
+#define IOMAN_ERR_SETATTROUTOFBOUNDS      1
+#define IOMAN_ERR_GETATTROUTOFBOUNDS      2
+#define IOMAN_ERR_READFAIL                3
+#define IOMAN_ERR_WRITEFAIL               4
+#define IOMAN_ERR_OPOUTOFBOUNDS           5
+#define IOMAN_ERR_PUSHBEYONDSTACK         6
+#define IOMAN_ERR_POPEMPTYSTACK           7
+#define IOMAN_ERR_CACHEPTROUTOFRANGE      8
+#define IOMAN_ERR_WRITEREADONLYSECTOR     9
+#define IOMAN_ERR_NOMEMORY                10
+
+#define DISC_NOERROR                      0
+
+#define PART_NOERROR                      0
+
+
+#endif

Copied: paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/extract.h (from rev 
5925, paparazzi3/trunk/sw/airborne/arm7/efsl/inc/extract.h)
===================================================================
--- paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/extract.h                  
        (rev 0)
+++ paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/extract.h  2010-09-22 
23:23:55 UTC (rev 5926)
@@ -0,0 +1,74 @@
+/*****************************************************************************\
+*              efs - General purpose Embedded Filesystem library              *
+*          --------------------- -----------------------------------          *
+*                                                                             *
+* Filename :  extract.h                                                       *
+* Description : Headerfile for extract.c                                      *
+*                                                                             *
+* This program is free software; you can redistribute it and/or               *
+* modify it under the terms of the GNU General Public License                 *
+* as published by the Free Software Foundation; version 2                     *
+* of the License.                                                             *
+                                                                              *
+* This program is distributed in the hope that it will be useful,             *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of              *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               *
+* GNU General Public License for more details.                                *
+*                                                                             *
+* As a special exception, if other files instantiate templates or             *
+* use macros or inline functions from this file, or you compile this          *
+* file and link it with other works to produce a work based on this file,     *
+* this file does not by itself cause the resulting work to be covered         *
+* by the GNU General Public License. However the source code for this         *
+* file must still be made available in accordance with section (3) of         *
+* the GNU General Public License.                                             *
+*                                                                             *
+* This exception does not invalidate any other reasons why a work based       *
+* on this file might be covered by the GNU General Public License.            *
+*                                                                             *
+*                                                    (c)2006 Lennart Yseboodt *
+*                                                    (c)2006 Michael De Nil   *
+\*****************************************************************************/
+
+#ifndef __EXTRACT_H_
+#define __EXTRACT_H_
+
+/*****************************************************************************/
+#include "config.h"
+#include "disc.h"
+#include "types.h"
+/*****************************************************************************/
+
+#ifdef BIG_ENDIAN
+
+#define ltb_end16(x)  ((((uint16)(x) & 0xff00) >> 8) | \
+                      (((uint16)(x) & 0x00ff) << 8))
+#define ltb_end32(x)  ((((uint32)(x) & 0xff000000) >> 24) | \
+                       (((uint32)(x) & 0x00ff0000) >> 8)  | \
+                       (((uint32)(x) & 0x0000ff00) << 8)  | \
+                       (((uint32)(x) & 0x000000ff) << 24))
+
+#else
+
+#define ltb_end16(x)  (x)
+#define ltb_end32(x)  (x)
+
+#endif
+
+#define btl_end16 ltb_end16
+#define btl_end32 ltb_end32
+
+
+/*****************************************************************************/
+
+euint16 ex_getb16(euint8* buf,euint32 offset);
+void ex_setb16(euint8* buf,euint32 offset,euint16 data);
+
+euint32 ex_getb32(euint8* buf,euint32 offset);
+void ex_setb32(euint8* buf,euint32 offset,euint32 data);
+
+void ex_getPartitionField(euint8* buf,PartitionField* pf, euint32 offset);
+void ex_setPartitionField(euint8* buf,PartitionField* pf, euint32 offset);
+
+#endif
+

Copied: paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/fat.h (from rev 5925, 
paparazzi3/trunk/sw/airborne/arm7/efsl/inc/fat.h)
===================================================================
--- paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/fat.h                      
        (rev 0)
+++ paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/fat.h      2010-09-22 
23:23:55 UTC (rev 5926)
@@ -0,0 +1,62 @@
+/*****************************************************************************\
+*              efs - General purpose Embedded Filesystem library              *
+*          --------------------- -----------------------------------          *
+*                                                                             *
+* Filename :  fat.h                                                           *
+* Description : Headerfile for fat.c The files are an extend of the fs.c fs.h *
+*               pair.                                                         *
+*                                                                             *
+* This program is free software; you can redistribute it and/or               *
+* modify it under the terms of the GNU General Public License                 *
+* as published by the Free Software Foundation; version 2                     *
+* of the License.                                                             *
+                                                                              *
+* This program is distributed in the hope that it will be useful,             *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of              *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               *
+* GNU General Public License for more details.                                *
+*                                                                             *
+* As a special exception, if other files instantiate templates or             *
+* use macros or inline functions from this file, or you compile this          *
+* file and link it with other works to produce a work based on this file,     *
+* this file does not by itself cause the resulting work to be covered         *
+* by the GNU General Public License. However the source code for this         *
+* file must still be made available in accordance with section (3) of         *
+* the GNU General Public License.                                             *
+*                                                                             *
+* This exception does not invalidate any other reasons why a work based       *
+* on this file might be covered by the GNU General Public License.            *
+*                                                                             *
+*                                                    (c)2006 Lennart Yseboodt *
+*                                                    (c)2006 Michael De Nil   *
+\*****************************************************************************/
+
+#ifndef __FAT_H_
+#define __FAT_H_
+
+/*****************************************************************************/
+#include "config.h"
+#include "error.h"
+#include "file.h"
+#include "debug.h"
+#include "types.h"
+/*****************************************************************************/
+
+euint32 fat_getSectorAddressFatEntry(FileSystem *fs,euint32 cluster_addr);
+euint32 fat_getNextClusterAddress(FileSystem *fs,      euint32 cluster_addr, 
euint16 *linear);
+void fat_setNextClusterAddress(FileSystem *fs,euint32 cluster_addr,euint32 
next_cluster_addr);
+eint16 fat_isEocMarker(FileSystem *fs,euint32 fat_entry);
+euint32 fat_giveEocMarker(FileSystem *fs);
+euint32 fat_findClusterAddress(FileSystem *fs,euint32 cluster,euint32 offset, 
euint8 *linear);
+euint32 fat_getNextClusterAddressWBuf(FileSystem *fs,euint32 cluster_addr, 
euint8 * buf);
+void fat_setNextClusterAddressWBuf(FileSystem *fs,euint32 cluster_addr,euint32 
next_cluster_addr,euint8 * buf);
+esint16 fat_getNextClusterChain(FileSystem *fs, ClusterChain *Cache);
+void fat_bogus(void);
+esint16 fat_LogicToDiscCluster(FileSystem *fs, ClusterChain *Cache,euint32 
logiccluster);
+eint16 fat_allocClusterChain(FileSystem *fs,ClusterChain *Cache,euint32 
num_clusters);
+eint16 fat_unlinkClusterChain(FileSystem *fs,ClusterChain *Cache);
+euint32 fat_countClustersInChain(FileSystem *fs,euint32 firstcluster);
+euint32 fat_DiscToLogicCluster(FileSystem *fs,euint32 firstcluster,euint32 
disccluster);
+euint32 fat_countFreeClusters(FileSystem *fs);
+
+#endif

Copied: paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/file.h (from rev 5925, 
paparazzi3/trunk/sw/airborne/arm7/efsl/inc/file.h)
===================================================================
--- paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/file.h                     
        (rev 0)
+++ paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/file.h     2010-09-22 
23:23:55 UTC (rev 5926)
@@ -0,0 +1,95 @@
+/*****************************************************************************\
+*              efs - General purpose Embedded Filesystem library              *
+*          --------------------- -----------------------------------          *
+*                                                                             *
+* Filename : file.h                                                           *
+* Description : Headerfile for file.c                                         *
+*                                                                             *
+* This program is free software; you can redistribute it and/or               *
+* modify it under the terms of the GNU General Public License                 *
+* as published by the Free Software Foundation; version 2                     *
+* of the License.                                                             *
+                                                                              *
+* This program is distributed in the hope that it will be useful,             *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of              *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               *
+* GNU General Public License for more details.                                *
+*                                                                             *
+* As a special exception, if other files instantiate templates or             *
+* use macros or inline functions from this file, or you compile this          *
+* file and link it with other works to produce a work based on this file,     *
+* this file does not by itself cause the resulting work to be covered         *
+* by the GNU General Public License. However the source code for this         *
+* file must still be made available in accordance with section (3) of         *
+* the GNU General Public License.                                             *
+*                                                                             *
+* This exception does not invalidate any other reasons why a work based       *
+* on this file might be covered by the GNU General Public License.            *
+*                                                                             *
+*                                                    (c)2006 Lennart Yseboodt *
+*                                                    (c)2006 Michael De Nil   *
+\*****************************************************************************/
+
+#ifndef __FILE_H_
+#define __FILE_H_
+
+/*****************************************************************************/
+#include "config.h"
+#include "error.h"
+#include "time.h"
+#include "fs.h"
+#include "dir.h"
+#include "plibc.h"
+#include "debug.h"
+#include "types.h"
+#include "fat.h"
+/*****************************************************************************/
+
+#define MODE_READ 0x72
+#define MODE_WRITE 0x77
+#define MODE_APPEND 0x61
+
+#define FILE_STATUS_OPEN 0
+#define FILE_STATUS_WRITE 1
+
+/*****************************************************************************\
+ *                              File                                         
+ *                             ------                                        
+ * FileRecord          DirEntry                Copy of the FileRecord for this 
file         
+ * FileLocation        Location                Location of the direntry
+ * FileSystem          *fs                             Pointer to the 
filesystem this file is on    
+ * FileCache           Cache                   Pointer to the cache object of 
the file   
+ * euint8                      FileStatus              Contains bitfield 
regarding filestatus   
+ * euint32                     FilePtr                 Offsetpointer for 
fread/fwrite functions
+ * euint32             FileSize                Working copy of the filesize, 
always use this,
+                                                                       it is 
more up to date than DirEntry->FileSize,
+                                                                       which 
is only updated when flushing to disc.
+\*****************************************************************************/
+struct File{
+       FileRecord DirEntry;
+       FileLocation Location; /* Location in directory!! */
+       FileSystem *fs;
+       ClusterChain Cache;
+       euint8  FileStatus;
+       euint32 FilePtr;
+       euint32 FileSize;
+};
+typedef struct File File;
+
+
+esint8 file_fopen(File *file, FileSystem *fs,eint8 *filename, eint8 mode);
+esint8 file_fclose(File *file);
+esint16 file_setpos(File *file,euint32 pos);
+euint32 file_fread(File *file,euint32 offset, euint32 size,euint8 *buf);
+euint32 file_read (File *file,euint32 size,euint8 *buf);
+euint32 file_fwrite(File* file,euint32 offset,euint32 size,euint8* buf);
+euint32 file_write (File* file,euint32 size,euint8* buf); 
+eint8* file_normalToFatName(eint8* filename,eint8* fatfilename);
+euint8 file_validateChar(euint8 c);
+void file_initFile(File *file, FileSystem *fs, FileLocation *loc);
+eint16 file_allocClusterChain(File *file,euint32 num_clusters);
+void file_setAttr(File* file,euint8 attribute,euint8 val);
+euint8 file_getAttr(File* file,euint8 attribute);
+euint32 file_requiredCluster(File *file,euint32 offset, euint32 size);
+
+#endif

Copied: paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/fs.h (from rev 5925, 
paparazzi3/trunk/sw/airborne/arm7/efsl/inc/fs.h)
===================================================================
--- paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/fs.h                       
        (rev 0)
+++ paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/fs.h       2010-09-22 
23:23:55 UTC (rev 5926)
@@ -0,0 +1,196 @@
+/*****************************************************************************\
+*              efs - General purpose Embedded Filesystem library              *
+*          --------------------- -----------------------------------          *
+*                                                                             *
+* Filename : fs.h                                                             *
+* Description : Headerfile for fs.c                                           *
+*                                                                             *
+* This program is free software; you can redistribute it and/or               *
+* modify it under the terms of the GNU General Public License                 *
+* as published by the Free Software Foundation; version 2                     *
+* of the License.                                                             *
+                                                                              *
+* This program is distributed in the hope that it will be useful,             *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of              *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               *
+* GNU General Public License for more details.                                *
+*                                                                             *
+* As a special exception, if other files instantiate templates or             *
+* use macros or inline functions from this file, or you compile this          *
+* file and link it with other works to produce a work based on this file,     *
+* this file does not by itself cause the resulting work to be covered         *
+* by the GNU General Public License. However the source code for this         *
+* file must still be made available in accordance with section (3) of         *
+* the GNU General Public License.                                             *
+*                                                                             *
+* This exception does not invalidate any other reasons why a work based       *
+* on this file might be covered by the GNU General Public License.            *
+*                                                                             *
+*                                                    (c)2006 Lennart Yseboodt *
+*                                                    (c)2006 Michael De Nil   *
+\*****************************************************************************/
+#ifndef __FS_H_
+#define __FS_H_
+
+/*****************************************************************************/
+#include "config.h"
+#include "error.h"
+#include "partition.h"
+#include "types.h"
+#include "debug.h"
+#include "time.h"
+/*****************************************************************************/
+
+#define FAT12 1
+#define FAT16 2
+#define FAT32 3
+
+#define FS_INFO_SECTOR 1
+#define FSINFO_MAGIC_BEGIN 0x41615252
+#define FSINFO_MAGIC_END   0xAA550000
+
+/*****************************************************************************************\
+              VolumeId
+               ------  
+* ushort BytesPerSector                Must be 512 or shit happens.
+* uchar  SectorsPerCluster     Must be multiple of 2 (1,2,4,8,16 or 32)
+* ushort ReservedSectorCount   Number of sectors after which the first FAT 
begins.
+* uchar         NumberOfFats           Should be 2
+* ushort RootEntryCount                Number of filerecords the Rootdir can 
contain. NOT for FAT32
+* ushort SectorCount16         Number of Sectors for 12/16 bit FAT 
+* ushort FatSectorCount16      Number of Sectors for 1 FAT on FAT12/16 bit 
FAT's
+* ulong  SectorCount32         Number of Sectors for 32 bit FAT
+* ulong FatSectorCount32       Number of Sectors for 1 FAT on FAT32 
+* ulong RootCluster                    Clusternumber of the first cluster of 
the RootDir on FAT 32
+This is NOT a complete volumeId copy, no direct I/O is possible.
+\*****************************************************************************************/
+struct VolumeId{
+       euint16 BytesPerSector;
+       euint8 SectorsPerCluster;
+       euint16 ReservedSectorCount;
+       euint8 NumberOfFats;
+       euint16 RootEntryCount;
+       euint16 SectorCount16;
+       euint16 FatSectorCount16;
+       euint32 SectorCount32;
+       euint32 FatSectorCount32;
+       euint32 RootCluster;
+};
+typedef struct VolumeId VolumeId;
+
+/**************************************************************************************************\
+              FileSystem
+               --------
+* Partition*   part            Pointer to partition on which this FS resides.
+* VolumeId             volumeId        Contains important FS info.
+* ulong                        DataClusterCount        Number of dataclusters. 
This number determines the FATType.
+* ulong                        FatSectorCount          Number of sectors for 1 
FAT, regardless of FATType
+* ulong                        SectorCount                     Number of 
sectors, regardless of FATType
+* ulong                FirstSectorRootDir      First sector of the RootDir. 
+* uchar                        type                            Determines 
FATType (FAT12 FAT16 or FAT32 are defined)
+
+\**************************************************************************************************/
+struct FileSystem{
+       Partition *part;
+       VolumeId volumeId;
+       euint32 DataClusterCount;
+       euint32 FatSectorCount;
+       euint32 SectorCount;
+       euint32 FirstSectorRootDir;
+       euint32 FirstClusterCurrentDir;
+       euint32 FreeClusterCount;
+       euint32 NextFreeCluster;
+       euint8 type;
+};
+typedef struct FileSystem FileSystem;
+
+/**************************************************************************************************\
              FileLocation
+               ----------
+* euint32              Sector                          Sector where the 
directoryentry of the file/directory can be found.
+* euint8               Offset                          Offset (in 32byte 
segments) where in the sector the entry is.
+
+\**************************************************************************************************/
+struct FileLocation{
+       euint32 Sector;
+       euint8 Offset;
+       euint8 attrib;
+};
+typedef struct FileLocation FileLocation;
+
+/*****************************************************************************\
+*                               FileCache                                    
+*                              -----------                                   
+* This struct acts as cache for the current file. It contains the current    
+* FATPointer (next location in the FAT table), LogicCluster                  
+* (the last part of the file that was read) and DataCluster                  
+* (the last cluster that was read).     
+* euint8               Linear                          For how many more 
clusters the file is nonfragmented
+* euint32              LogicCluster            This field determines the n'th 
cluster of the file as current
+* euint32              DiscCluster             If this field is 0, it means 
the cache is invalid. Otherwise
+                                                                       it is 
the clusternumber corresponding with 
+                                                                       
logic(FirstCluster+LogicCluster).
+* euint32              FirstCluster            First cluster of the chain. 
Zero or one are invalid.
+* euint32              LastCluster             Last cluster of the chain (is 
not always filled in)
+\*****************************************************************************/
+struct ClusterChain{
+       euint8 Linear;
+       esint32 LogicCluster;
+       euint32 DiscCluster;
+       euint32 FirstCluster;
+       euint32 LastCluster;
+       euint32 ClusterCount;
+};
+typedef struct ClusterChain ClusterChain;
+
+/*****************************************************************************\
+*                               FileRecord                                    *
+*                              ------------                                   *
+* This struct represents a 32 byte file entry as it occurs in the data area   *
+* of the filesystem. Direct I/O is possible.                                  *
+\*****************************************************************************/
+struct FileRecord{
+       euint8 FileName[11];
+       euint8 Attribute;
+       euint8 NTReserved;
+       euint8 MilliSecTimeStamp;
+       euint16 CreatedTime;
+       euint16 CreatedDate;
+       euint16 AccessDate;
+       euint16 FirstClusterHigh;
+       euint16 WriteTime;
+       euint16 WriteDate;
+       euint16 FirstClusterLow;
+       euint32 FileSize;
+};
+typedef struct FileRecord FileRecord;
+
+
+eint16 fs_initFs(FileSystem *fs,Partition *part);
+eint16 fs_isValidFat(Partition *part);
+void fs_loadVolumeId(FileSystem *fs, Partition *part);
+esint16 fs_verifySanity(FileSystem *fs);
+void fs_countDataSectors(FileSystem *fs);
+void fs_determineFatType(FileSystem *fs);
+void fs_findFirstSectorRootDir(FileSystem *fs);
+void fs_initCurrentDir(FileSystem *fs);
+euint32 fs_getSectorAddressRootDir(FileSystem *fs,euint32 secref);
+euint32 fs_clusterToSector(FileSystem *fs,euint32 cluster);
+euint32 fs_sectorToCluster(FileSystem *fs,euint32 sector);
+euint32 fs_getNextFreeCluster(FileSystem *fs,euint32 startingcluster);
+euint32 fs_giveFreeClusterHint(FileSystem *fs);
+esint16 fs_findFreeFile(FileSystem *fs,eint8* filename,FileLocation 
*loc,euint8 mode);
+esint8 fs_findFile(FileSystem *fs,eint8* filename,FileLocation *loc,euint32 
*lastDir);
+esint8 fs_findFile_broken(FileSystem *fs,eint8* filename,FileLocation *loc);
+euint32 fs_getLastCluster(FileSystem *fs,ClusterChain *Cache);
+euint32 fs_getFirstClusterRootDir(FileSystem *fs);
+euint16 fs_makeDate(void);
+euint16 fs_makeTime(void);
+void fs_setFirstClusterInDirEntry(FileRecord *rec,euint32 cluster_addr);
+void fs_initClusterChain(FileSystem *fs,ClusterChain *cache,euint32 
cluster_addr);
+esint8 fs_flushFs(FileSystem *fs);
+esint8 fs_umount(FileSystem *fs);
+esint8 fs_clearCluster(FileSystem *fs,euint32 cluster);
+esint8 fs_getFsInfo(FileSystem *fs,euint8 force_update);
+esint8 fs_setFsInfo(FileSystem *fs);
+
+#endif

Copied: paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/interface.h (from rev 
5925, paparazzi3/trunk/sw/airborne/arm7/efsl/inc/interface.h)
===================================================================
--- paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/interface.h                
                (rev 0)
+++ paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/interface.h        
2010-09-22 23:23:55 UTC (rev 5926)
@@ -0,0 +1,54 @@
+/*****************************************************************************\
+*              efs - General purpose Embedded Filesystem library              *
+*          --------------------------------------------------------           *
+*                                                                             *
+* Filename : interface.h                                                      *
+* Description : This headerfile includes the right interface headerfile       *
+*                                                                             *
+* This program is free software; you can redistribute it and/or               *
+* modify it under the terms of the GNU General Public License                 *
+* as published by the Free Software Foundation; version 2                     *
+* of the License.                                                             *
+                                                                              *
+* This program is distributed in the hope that it will be useful,             *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of              *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               *
+* GNU General Public License for more details.                                *
+*                                                                             *
+* As a special exception, if other files instantiate templates or             *
+* use macros or inline functions from this file, or you compile this          *
+* file and link it with other works to produce a work based on this file,     *
+* this file does not by itself cause the resulting work to be covered         *
+* by the GNU General Public License. However the source code for this         *
+* file must still be made available in accordance with section (3) of         *
+* the GNU General Public License.                                             *
+*                                                                             *
+* This exception does not invalidate any other reasons why a work based       *
+* on this file might be covered by the GNU General Public License.            *
+*                                                                             *
+*                                                    (c)2006 Lennart Yseboodt *
+*                                                    (c)2006 Michael De Nil   *
+\*****************************************************************************/
+
+#ifndef __TYPES_H__
+#define __TYPES_H__
+
+/*****************************************************************************/
+#include "types.h"
+#include "config.h"
+/*****************************************************************************/
+
+#if defined(HW_ENDPOINT_LINUX) || defined(HW_ENDPOINT_LINUX64)
+       #include "interfaces/linuxfile.h"
+#elif defined(HW_ENDPOINT_ATMEGA128_SD)
+       #include "interfaces/atmega128.h"
+#elif defined(HW_ENDPOINT_DSP_TI6713_SD)
+       #include "interfaces/dsp67xx.h"
+#elif defined(HW_ENDPOINT_LPC2000_SD)
+       #include "interfaces/lpc2000_spi.h"
+#else
+       #error "NO INTERFACE DEFINED - see interface.h"
+#endif
+
+#endif
+

Copied: 
paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/interfaces/LPC2000_regs.h 
(from rev 5925, 
paparazzi3/trunk/sw/airborne/arm7/efsl/inc/interfaces/LPC2000_regs.h)
===================================================================
--- paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/interfaces/LPC2000_regs.h  
                        (rev 0)
+++ paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/interfaces/LPC2000_regs.h  
2010-09-22 23:23:55 UTC (rev 5926)
@@ -0,0 +1,72 @@
+/* based on LPC213x.h from Keil GmbH (keil.com/arm.com)  */
+
+#ifndef LPC2000_regs_h
+#define LPC2000_regs_h
+
+/* Pin Connect Block */
+#define PINSEL0        (*((volatile unsigned long *) 0xE002C000))
+#define PINSEL1        (*((volatile unsigned long *) 0xE002C004))
+#define PINSEL2        (*((volatile unsigned long *) 0xE002C014))
+
+/* General Purpose Input/Output (GPIO) */
+#define IOPIN0         (*((volatile unsigned long *) 0xE0028000))
+#define IOSET0         (*((volatile unsigned long *) 0xE0028004))
+#define IODIR0         (*((volatile unsigned long *) 0xE0028008))
+#define IOCLR0         (*((volatile unsigned long *) 0xE002800C))
+#define IOPIN1         (*((volatile unsigned long *) 0xE0028010))
+#define IOSET1         (*((volatile unsigned long *) 0xE0028014))
+#define IODIR1         (*((volatile unsigned long *) 0xE0028018))
+#define IOCLR1         (*((volatile unsigned long *) 0xE002801C))
+
+/* SPI0 (Serial Peripheral Interface 0) */
+#define S0SPCR         (*((volatile unsigned char *) 0xE0020000))
+#define S0SPSR         (*((volatile unsigned char *) 0xE0020004))
+#define S0SPDR         (*((volatile unsigned char *) 0xE0020008))
+#define S0SPCCR        (*((volatile unsigned char *) 0xE002000C))
+#define S0SPTCR        (*((volatile unsigned char *) 0xE0020010))
+#define S0SPTSR        (*((volatile unsigned char *) 0xE0020014))
+#define S0SPTOR        (*((volatile unsigned char *) 0xE0020018))
+#define S0SPINT        (*((volatile unsigned char *) 0xE002001C))
+
+/* SSP Controller */
+#define SSPCR0         (*((volatile unsigned short* ) 0xE0068000))
+#define SSPCR1         (*((volatile unsigned char * ) 0xE0068004))
+#define SSPDR          (*((volatile unsigned short* ) 0xE0068008))
+#define SSPSR          (*((volatile unsigned char * ) 0xE006800C))
+#define SSPCPSR        (*((volatile unsigned char * ) 0xE0068010))
+#define SSPIMSC        (*((volatile unsigned char * ) 0xE0068014))
+#define SSPRIS         (*((volatile unsigned char * ) 0xE0068018))
+#define SSPMIS         (*((volatile unsigned char * ) 0xE006801C))
+#define SSPICR         (*((volatile unsigned char * ) 0xE0068020))
+#define SSPDMACR       (*((volatile unsigned char * ) 0xE0068024))
+
+/* Real Time Clock */
+/* maybe useful for the efsl time-handling : */
+#define ILR            (*((volatile unsigned char *) 0xE0024000))
+#define CTC            (*((volatile unsigned short*) 0xE0024004))
+#define CCR            (*((volatile unsigned char *) 0xE0024008))
+#define CIIR           (*((volatile unsigned char *) 0xE002400C))
+#define AMR            (*((volatile unsigned char *) 0xE0024010))
+#define CTIME0         (*((volatile unsigned long *) 0xE0024014))
+#define CTIME1         (*((volatile unsigned long *) 0xE0024018))
+#define CTIME2         (*((volatile unsigned long *) 0xE002401C))
+#define SEC            (*((volatile unsigned char *) 0xE0024020))
+#define MIN            (*((volatile unsigned char *) 0xE0024024))
+#define HOUR           (*((volatile unsigned char *) 0xE0024028))
+#define DOM            (*((volatile unsigned char *) 0xE002402C))
+#define DOW            (*((volatile unsigned char *) 0xE0024030))
+#define DOY            (*((volatile unsigned short*) 0xE0024034))
+#define MONTH          (*((volatile unsigned char *) 0xE0024038))
+#define YEAR           (*((volatile unsigned short*) 0xE002403C))
+#define ALSEC          (*((volatile unsigned char *) 0xE0024060))
+#define ALMIN          (*((volatile unsigned char *) 0xE0024064))
+#define ALHOUR         (*((volatile unsigned char *) 0xE0024068))
+#define ALDOM          (*((volatile unsigned char *) 0xE002406C))
+#define ALDOW          (*((volatile unsigned char *) 0xE0024070))
+#define ALDOY          (*((volatile unsigned short*) 0xE0024074))
+#define ALMON          (*((volatile unsigned char *) 0xE0024078))
+#define ALYEAR         (*((volatile unsigned short*) 0xE002407C))
+#define PREINT         (*((volatile unsigned short*) 0xE0024080))
+#define PREFRAC        (*((volatile unsigned short*) 0xE0024084))
+
+#endif 

Copied: 
paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/interfaces/lpc2000_spi.h (from 
rev 5925, paparazzi3/trunk/sw/airborne/arm7/efsl/inc/interfaces/lpc2000_spi.h)
===================================================================
--- paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/interfaces/lpc2000_spi.h   
                        (rev 0)
+++ paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/interfaces/lpc2000_spi.h   
2010-09-22 23:23:55 UTC (rev 5926)
@@ -0,0 +1,65 @@
+/*****************************************************************************\
+*              efs - General purpose Embedded Filesystem library              *
+*          --------------------- -----------------------------------          *
+*                                                                             *
+* Filename :  lpc2000_spi.h                                                   *
+* Description : Headerfile for lpc2000_spi.c                                  *
+*                                                                             *
+* This program is free software; you can redistribute it and/or               *
+* modify it under the terms of the GNU General Public License                 *
+* as published by the Free Software Foundation; version 2                     *
+* of the License.                                                             *
+                                                                              *
+* This program is distributed in the hope that it will be useful,             *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of              *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               *
+* GNU General Public License for more details.                                *
+*                                                                             *
+* As a special exception, if other files instantiate templates or             *
+* use macros or inline functions from this file, or you compile this          *
+* file and link it with other works to produce a work based on this file,     *
+* this file does not by itself cause the resulting work to be covered         *
+* by the GNU General Public License. However the source code for this         *
+* file must still be made available in accordance with section (3) of         *
+* the GNU General Public License.                                             *
+*                                                                             *
+* This exception does not invalidate any other reasons why a work based       *
+* on this file might be covered by the GNU General Public License.            *
+*                                                                             *
+*                             LPC2000 ARM7 Interface (c)2005 Martin Thomas    *
+\*****************************************************************************/
+
+#ifndef __LPC2000_SPI_H_ 
+#define __LPC2000_SPI_H_ 
+
+#ifndef FALSE
+#define FALSE  0x00
+#define TRUE   0x01
+#endif
+
+#include "../debug.h"
+#include "config.h"
+
+
+/*************************************************************\
+              hwInterface
+               ----------
+* FILE*        imagefile               File emulation of hw interface.
+* long         sectorCount             Number of sectors on the file.
+\*************************************************************/
+struct  hwInterface{
+       /*FILE  *imageFile;*/
+       eint32          sectorCount;
+};
+typedef struct hwInterface hwInterface;
+
+esint8 if_initInterface(hwInterface* file,eint8* opts);
+esint8 if_readBuf(hwInterface* file,euint32 address,euint8* buf);
+esint8 if_writeBuf(hwInterface* file,euint32 address,euint8* buf);
+esint8 if_setPos(hwInterface* file,euint32 address);
+
+void if_spiInit(hwInterface *iface);
+void if_spiSetSpeed(euint8 speed);
+euint8 if_spiSend(hwInterface *iface, euint8 outgoing);
+
+#endif

Copied: paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/interfaces/sd.h (from 
rev 5925, paparazzi3/trunk/sw/airborne/arm7/efsl/inc/interfaces/sd.h)
===================================================================
--- paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/interfaces/sd.h            
                (rev 0)
+++ paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/interfaces/sd.h    
2010-09-22 23:23:55 UTC (rev 5926)
@@ -0,0 +1,66 @@
+/*****************************************************************************\
+*              efs - General purpose Embedded Filesystem library              *
+*          ---------------------------------------------------------          *
+*                                                                             *
+* Filename :  sd.h                                                            *
+* Revision :  Initial developement                                            *
+* Description : Headerfile for sd.c                                           *
+*                                                                             *
+* This program is free software; you can redistribute it and/or               *
+* modify it under the terms of the GNU General Public License                 *
+* as published by the Free Software Foundation; version 2                     *
+* of the License.                                                             *
+                                                                              *
+* This program is distributed in the hope that it will be useful,             *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of              *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               *
+* GNU General Public License for more details.                                *
+*                                                                             *
+* As a special exception, if other files instantiate templates or             *
+* use macros or inline functions from this file, or you compile this          *
+* file and link it with other works to produce a work based on this file,     *
+* this file does not by itself cause the resulting work to be covered         *
+* by the GNU General Public License. However the source code for this         *
+* file must still be made available in accordance with section (3) of         *
+* the GNU General Public License.                                             *
+*                                                                             *
+* This exception does not invalidate any other reasons why a work based       *
+* on this file might be covered by the GNU General Public License.            *
+*                                                                             *
+*                                                    (c)2006 Lennart Yseboodt *
+*                                                    (c)2006 Michael De Nil   *
+\*****************************************************************************/
+
+#ifndef __SD_H_ 
+#define __SD_H_ 
+
+#include "config.h"
+#include "types.h"
+#include "../debug.h"
+
+#ifdef HW_ENDPOINT_ATMEGA128_SD
+       #include "interfaces/atmega128.h"
+#endif
+#ifdef HW_ENDPOINT_DSP_TI6713_SD
+       #include "interfaces/dsp67xx.h"
+#endif
+#ifdef HW_ENDPOINT_LPC2000_SD
+       #include "interfaces/lpc2000_spi.h"
+#endif
+
+#define        CMDREAD         17
+#define        CMDWRITE        24
+#define        CMDREADCSD       9
+
+esint8  sd_Init(hwInterface *iface);
+void sd_Command(hwInterface *iface,euint8 cmd, euint16 paramx, euint16 paramy);
+euint8 sd_Resp8b(hwInterface *iface);
+void sd_Resp8bError(hwInterface *iface,euint8 value);
+euint16 sd_Resp16b(hwInterface *iface);
+esint8 sd_State(hwInterface *iface);
+
+esint8 sd_readSector(hwInterface *iface,euint32 address,euint8* buf, euint16 
len);
+esint8 sd_writeSector(hwInterface *iface,euint32 address, euint8* buf);
+esint8 sd_getDriveSize(hwInterface *iface, euint32* drive_size );
+
+#endif

Copied: paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/ioman.h (from rev 
5925, paparazzi3/trunk/sw/airborne/arm7/efsl/inc/ioman.h)
===================================================================
--- paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/ioman.h                    
        (rev 0)
+++ paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/ioman.h    2010-09-22 
23:23:55 UTC (rev 5926)
@@ -0,0 +1,135 @@
+/*****************************************************************************\
+*                     libfat - General purpose FAT library                    *
+*                      ----------------------------------                     *
+*                                                                             *
+* Filename : ioman.h                                                          *
+* Description : Header file for ioman.c                                       *
+*                                                                             *
+* This program is free software; you can redistribute it and/or               *
+* modify it under the terms of the GNU General Public License                 *
+* as published by the Free Software Foundation; version 2                     *
+* of the License.                                                             *
+                                                                              *
+* This program is distributed in the hope that it will be useful,             *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of              *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               *
+* GNU General Public License for more details.                                *
+*                                                                             *
+* As a special exception, if other files instantiate templates or             *
+* use macros or inline functions from this file, or you compile this          *
+* file and link it with other works to produce a work based on this file,     *
+* this file does not by itself cause the resulting work to be covered         *
+* by the GNU General Public License. However the source code for this         *
+* file must still be made available in accordance with section (3) of         *
+* the GNU General Public License.                                             *
+*                                                                             *
+* This exception does not invalidate any other reasons why a work based       *
+* on this file might be covered by the GNU General Public License.            *
+*                                                                             *
+*                                                    (c)2006 Lennart Yseboodt *
+*                                                    (c)2006 Michael De Nil   *
+\*****************************************************************************/
+
+#ifndef __IOMAN_H__
+#define __IOMAN_H__
+
+/*****************************************************************************/
+#include "interface.h"
+#include "error.h"
+#include "plibc.h"
+#include "debug.h"
+#include "types.h"
+#include "config.h"
+/*****************************************************************************/
+
+#define IOMAN_STATUS_ATTR_VALIDDATA  0
+#define IOMAN_STATUS_ATTR_USERBUFFER 1
+#define IOMAN_STATUS_ATTR_WRITE      2
+
+#define IOM_MODE_READONLY  1
+#define IOM_MODE_READWRITE 2
+#define IOM_MODE_EXP_REQ   4
+
+struct IOManStack{
+       euint32 sector;
+       euint8  status;
+       euint8  usage;
+};
+typedef struct IOManStack IOManStack;
+
+struct IOManager{
+       hwInterface *iface;
+       
+       euint8 *bufptr;
+       euint16 numbuf;
+       euint16 numit;
+               
+       IOMAN_ERR_EUINT8
+               
+       IOManStack stack[IOMAN_NUMBUFFER][IOMAN_NUMITERATIONS];
+       
+       euint32 sector[IOMAN_NUMBUFFER];
+       euint8  status[IOMAN_NUMBUFFER];
+       euint8  usage[IOMAN_NUMBUFFER];
+       euint8  reference[IOMAN_NUMBUFFER];
+       euint8  itptr[IOMAN_NUMBUFFER];
+#ifdef IOMAN_DO_MEMALLOC
+       euint8  cache_mem[IOMAN_NUMBUFFER * 512];
+#endif
+};
+typedef struct IOManager IOManager;
+
+#define IOBJ ioman
+
+#define ioman_isValid(bp) ioman_getAttr(IOBJ,bp,IOMAN_STATUS_ATTR_VALIDDATA)
+#define ioman_isUserBuf(bp) ioman_getAttr(IOBJ,bp,IOMAN_STATUS_ATTR_USERBUFFER)
+#define ioman_isWritable(bp) ioman_getAttr(IOBJ,bp,IOMAN_STATUS_ATTR_WRITE)
+
+#define ioman_setValid(bp) ioman_setAttr(IOBJ,bp,IOMAN_STATUS_ATTR_VALIDDATA,1)
+#define ioman_setUserBuf(bp) 
ioman_setAttr(IOBJ,bp,IOMAN_STATUS_ATTR_USERBUFFER,1)
+#define ioman_setWritable(bp) ioman_setAttr(IOBJ,bp,IOMAN_STATUS_ATTR_WRITE,1)
+
+#define ioman_setNotValid(bp) 
ioman_setAttr(IOBJ,bp,IOMAN_STATUS_ATTR_VALIDDATA,0)
+#define ioman_setNotUserBuf(bp) 
ioman_setAttr(IOBJ,bp,IOMAN_STATUS_ATTR_USERBUFFER,0)
+#define ioman_setNotWritable(bp) 
ioman_setAttr(IOBJ,bp,IOMAN_STATUS_ATTR_WRITE,0)
+
+#define ioman_isReqRo(mode)  ((mode)&(IOM_MODE_READONLY))
+#define ioman_isReqRw(mode)  ((mode)&(IOM_MODE_READWRITE))
+#define ioman_isReqExp(mode) ((mode)&(IOM_MODE_EXP_REQ))
+
+esint8 ioman_init(IOManager *ioman, hwInterface *iface, euint8* bufferarea);
+void ioman_reset(IOManager *ioman);
+euint8* ioman_getBuffer(IOManager *ioman,euint8* bufferarea);
+void ioman_setAttr(IOManager *ioman,euint16 bufplace,euint8 attribute,euint8 
val);
+euint8 ioman_getAttr(IOManager *ioman,euint16 bufplace,euint8 attribute);
+euint8 ioman_getUseCnt(IOManager *ioman,euint16 bufplace);
+void ioman_incUseCnt(IOManager *ioman,euint16 bufplace);
+void ioman_decUseCnt(IOManager *ioman,euint16 bufplace);
+void ioman_resetUseCnt(IOManager *ioman,euint16 bufplace);
+euint8 ioman_getRefCnt(IOManager *ioman,euint16 bufplace);
+void ioman_incRefCnt(IOManager *ioman,euint16 bufplace);
+void ioman_decRefCnt(IOManager *ioman,euint16 bufplace);
+void ioman_resetRefCnt(IOManager *ioman,euint16 bufplace);
+esint8 ioman_pop(IOManager *ioman,euint16 bufplace);
+esint8 ioman_push(IOManager *ioman,euint16 bufplace);
+euint8* ioman_getPtr(IOManager *ioman,euint16 bufplace);
+esint16 ioman_getBp(IOManager *ioman,euint8* buf);
+esint8 ioman_readSector(IOManager *ioman,euint32 address,euint8* buf);
+esint8 ioman_writeSector(IOManager *ioman, euint32 address, euint8* buf);
+void ioman_resetCacheItem(IOManager *ioman,euint16 bufplace);
+esint32 ioman_findSectorInCache(IOManager *ioman, euint32 address);
+esint32 ioman_findFreeSpot(IOManager *ioman);
+esint32 ioman_findUnusedSpot(IOManager *ioman);
+esint32 ioman_findOverallocableSpot(IOManager *ioman);
+esint8 ioman_putSectorInCache(IOManager *ioman,euint32 address, euint16 
bufplace);
+esint8 ioman_flushSector(IOManager *ioman, euint16 bufplace);
+euint8* ioman_getSector(IOManager *ioman,euint32 address, euint8 mode);
+esint8 ioman_releaseSector(IOManager *ioman,euint8* buf);
+esint8 ioman_directSectorRead(IOManager *ioman,euint32 address, euint8* buf);
+esint8 ioman_directSectorWrite(IOManager *ioman,euint32 address, euint8* buf);
+esint8 ioman_flushRange(IOManager *ioman,euint32 address_low, euint32 
address_high);
+esint8 ioman_flushAll(IOManager *ioman);
+
+void ioman_printStatus(IOManager *ioman);
+
+#endif

Copied: paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/ls.h (from rev 5925, 
paparazzi3/trunk/sw/airborne/arm7/efsl/inc/ls.h)
===================================================================
--- paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/ls.h                       
        (rev 0)
+++ paparazzi3/trunk/sw/airborne/arch/lpc21/efsl/inc/ls.h       2010-09-22 
23:23:55 UTC (rev 5926)
@@ -0,0 +1,68 @@
+/*****************************************************************************\
+*              efs - General purpose Embedded Filesystem library              *
+*          --------------------- -----------------------------------          *
+*                                                                             *
+* Filename : ls.h                                                             *
+* Description : Headerfile for ls.c                                           *
+*                                                                             *
+* This program is free software; you can redistribute it and/or               *
+* modify it under the terms of the GNU General Public License                 *
+* as published by the Free Software Foundation; version 2                     *
+* of the License.                                                             *
+                                                                              *
+* This program is distributed in the hope that it will be useful,             *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of              *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               *
+* GNU General Public License for more details.                                *
+*                                                                             *
+* As a special exception, if other files instantiate templates or             *
+* use macros or inline functions from this file, or you compile this          *
+* file and link it with other works to produce a work based on this file,     *
+* this file does not by itself cause the resulting work to be covered         *
+* by the GNU General Public License. However the source code for this         *
+* file must still be made available in accordance with section (3) of         *
+* the GNU General Public License.                                             *
+*                                                                             *
+* This exception does not invalidate any other reasons why a work based       *
+* on this file might be covered by the GNU General Public License.            *
+*                                                                             *
+*                                                    (c)2006 Lennart Yseboodt *
+*                                                    (c)2006 Michael De Nil   *
+\*****************************************************************************/
+
+#ifndef __LS_H__
+#define __LS_H__
+
+/*****************************************************************************/
+#include "config.h"
+#include "fs.h"
+#include "dir.h"
+#include "fat.h"
+/*****************************************************************************/
+
+struct ListDirEntry{
+       euint8 FileName[LIST_MAXLENFILENAME];
+       euint32 FileSize;
+       euint8 Attribute;
+};

@@ Diff output truncated at 153600 characters. @@



reply via email to

[Prev in Thread] Current Thread [Next in Thread]