1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-11-29 07:24:13 +01:00
Commit Graph

28 Commits

Author SHA1 Message Date
Stacey Sheldon
ac75dd7be1 Revert "bu: remove LED support from bootloader updaters"
This reverts commit 7f03a77492.
2012-05-23 00:46:19 -04:00
Stacey Sheldon
400e529703 bu: add back LED feedback
LED support was dropped from the BU images due to a lack
of proper abstraction for LED definitions between CC and
CC3D HW variants in the CopterControl board family.

Use the new LED abstraction to hide board revision details
from the BU image so it can once again flash some LEDs.
2012-05-23 00:31:08 -04:00
Stacey Sheldon
3b0508e753 bu: check compatibility btw BL and HW before installing
CC and CC3D boards share the same FW image.  This is accomplished
by checking the BOARD_REVISION field in the board_info_blob
that is stored in the BL partition in flash as we init the FW.

Make sure that the BU image only writes a BL image that has
the same BOARD_TYPE and BOARD_REVISION fields in the embedded
image as the ones currently in flash on the board.

This ensures that we never write a CC3D BL image onto a CC board
and vice versa.  This check should prevent "bricking" a board.
2012-05-22 00:33:40 -04:00
James Cotton
a9b8e74b0d Disable LEDs on the bootloader update as without knowing the particular
hardware revision it cannot know which pios_led_cfg_ structure to use.
Possibly this should be abstracted further into board_hw_defs to create
functions like board_init_led.

Also the BU should probably compare the hw_revision of the original and new
bootloader to make sure the user doesn't break their board.
2012-05-04 08:53:14 -05:00
Stacey Sheldon
7f03a77492 bu: remove LED support from bootloader updaters
Bootloader updaters were all broken due to recent
changes in LED configuration handling.  Removing
LED support from the BU loads allows them to build
again, but they provide no feedback about when they're
finished writing flash.
2012-04-16 15:09:10 -04:00
Stacey Sheldon
dc4aa07a32 board_hw_defs: factor out board-specific hw config definitions
Board specific HW configuration is now collected in a single .c
file for each board.  This HW configuration is #include'd into
the FW, BL and BU builds for each board.

These new .c files are found in:
  flight/board_hw_defs/<board_name>/board_hw_defs.c

Parts of this information were previously duplicated between
the BL and FW builds.  This commit cleans up the duplication.

Using a #include on a .c file is a bit ugly but it allows us
to ensure that all of the symbols in the board_hw_defs.c file
are *ONLY* used in the PIOS_Board_Init() function for each
software build.
2012-01-22 19:41:41 -05:00
Stacey Sheldon
6bb4f0c61d leds: use boot-time config for PiOS LED layer
LEDs are now configured based on a board-specific initialization
in PIOS_BOARD_Init().

LEDs are now named:
  PIOS_LED_HEARTBEAT
  PIOS_LED_ALARM
2012-01-22 18:22:59 -05:00
Mike Smith
deade53c5d OP-578 - check for CODE_SOURCERY before setting -fpromote-loop-indices 2011-09-11 10:49:09 -07:00
Stacey Sheldon
4da671fc82 build: change firmware files from .opf to .opfw extensions 2011-05-25 00:20:02 -04:00
Oleg Semyonov
66804076b8 build: fix release/Makefile for *.opf files and changed targets 2011-05-24 23:49:51 -04:00
Stacey Sheldon
6e406c0232 build: remove all remaining use of -DUSE_BOOTLOADER
The USE_BOOTLOADER compile flag was only being used
to determine where the ISR vector table was located.

Provide this explicitly from the linker since it knows
exactly where it is putting the ISR vector table.
2011-05-23 18:21:42 -04:00
Stacey Sheldon
0a67730d0f build: refactor fw, bl and bu rules
- New macros for fw, bl and bu rules in top-level make
- Per-board info factored into make/board/*/board-info.mk
- Per-board info now shared btw. fw, bl and blupd for each board
   - BOARD_TYPE, BOARD_REVISION, BOOTLOADER_VERSION, HW_TYPE
   - MCU, CHIP, BOARD, MODEL, MODEL_SUFFIX
   - START_OF_BL_CODE, START_OF_FW_CODE
- blupd_* goals renamed to bu_*
- all_blupd goal renamed to all_bu
- firmware goals renamed to fw_*, board name goals are preserved
- bu_*_program now writes updater to correct address for all boards
- BL updater firmware builds now produce .opf format including
  version info blob.
- BL updater firmware name now includes board name.
- INS makefile brought up to date w.r.t. linker scripts
2011-05-23 18:21:42 -04:00
Oleg Semyonov
bac95dae11 OP-483: get rid of -D install switch (doesn't work on Mac) and use mkdir -p instead 2011-05-14 23:17:08 +03:00
Oleg Semyonov
a7833e0120 OP-483: add install target for bootloader updater 2011-05-13 11:25:35 +03:00
Oleg Semyonov
bf8939eb30 OP-483: cleanup: remove unneeded test.bin from BootloaderUpdater 2011-05-13 11:25:30 +03:00
James Cotton
d140d9c1fc Fix from Ivan for BootloaderUpdater not building with 4.5.1 2011-05-10 02:11:34 -05:00
Stacey Sheldon
29ec2f198b build: convert all app loads to require bootloaders
This change is made up of a number of tightly coupled
changes:
 - Deprecate the use of the USE_BOOTLOADER command-line
   option.  It is now hard-coded in each Makefile.
   Overriding it on the command line is not allowed.
 - Split apart the memory declaration and the section
   declaration in all linker files (*_memory.ld and
   *_sections.ld).
 - Describe the split between bootloader and app sections
   of flash in each board's _memory.ld file.
 - Change program target to selectively erase flash so
   that the installed bootloader is preserved across even
   JTAG programming operations.
 - All elf files are built with debug symbols and are not
   stripped.  This should help debugging with gdb.  The
   images programmed on the boards are all .bin files now
   which do not include symbols.
2011-05-08 12:40:29 -04:00
Stacey Sheldon
465034cf94 bootloaders: always build with debug symbols enabled
This makes it easier to use gdb to debug issues.  This does
not change the -O flags, only makes -g always on and does
not strip the .elf files.
2011-05-08 12:40:28 -04:00
Stacey Sheldon
18ea93119f build: Add support for BL_Updaters to top-level makefile
New targets:
 - make blupd_all_clean
 - make blupd_all
 - make blupd_openpilot
 - make blupd_ahrs
 - make blupd_coptercontrol
 - make blupd_pipxtreme

These targets are also included in the 'all_flight' target.
2011-05-08 12:40:28 -04:00
Stacey Sheldon
58a2c71532 line-end changes only 2011-05-07 18:05:50 -04:00
James Cotton
69d03ca101 OP-439: Simplify further. Abstract most of the OOCD flags into the common
firmware include and delete all the extra foss-jtag config files.  There is now
a legacy file for the revA board a second for AHRS that changes the port
2011-04-24 10:19:00 -05:00
Corvus Corax
ee7179bd53 OP-439 unified OpenOCD config for mac os x and Linux, Makefiles adapted accordingly 2011-04-24 12:10:33 +02:00
osnwt
6613158206 BootloaderUpdater: fixed compilation errors. It works with CC too (tested).
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2813 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-19 19:18:03 +00:00
zedamota
9050608e6c Flight/Bootloader - Bootloader updater, minor update to help user with the CL options
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2805 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-17 15:02:10 +00:00
zedamota
56c195fa9a Flight/Bootloader - Bootloader updater, WORKING - tested with PipX only (should work for all boards though).
Led(LED1 different color on each board) Sequence:
1-Power On
2-Led ON for 3 seconds (you can disconnect during this time - safety measure) 
3-Led flashes very quickly while the board is being programed (because the program is stored in memory this is very fast and looks like a led glitch)
4-If all good - LED flashes 3 times with a 1sec period and turns off - you may now reboot.
4-If an error ocurred - LED will keep flashing with a 500ms period until power off

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2804 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-17 14:54:57 +00:00
zedamota
949617e236 Flight/Bootloader - Bootloader updater, minor fix
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2801 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-16 15:04:59 +00:00
zedamota
993a4a7c5f Flight/Bootloader - Bootloader updater, needs testing
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2798 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-15 17:42:24 +00:00
zedamota
0abec1908d Flight/Bootloadera - small cleaning up. Start of Bootloader Update firmware witch will enable users to update the Bootloader itself without JTAG.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2794 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-14 18:15:25 +00:00