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

33 Commits

Author SHA1 Message Date
Stacey Sheldon
91cb294730 build: remove redundant PHONY for size target 2011-05-24 01:10:40 -04:00
Stacey Sheldon
0eb92fad91 build: refactor jtag program and add jtag wipe target
Macros for JTAG program and wipe for each target are now
provided in firmware-defs.mk.

The _wipe target for each firmware and bootloader image will
erase either the bootloader (bl_*_wipe) or firmware (fw_*_wipe)
bank.
2011-05-24 01:10:31 -04:00
Stacey Sheldon
9973fda23b build: define bootloader and firmware bank spans
The board-info.mk files now define the start and size
of the bootloader and the firmware banks.
2011-05-24 01:03:01 -04:00
Stacey Sheldon
504fe7a664 dfu: fix typo WRITABLA -> WRITABLE 2011-05-24 00:58:10 -04:00
Stacey Sheldon
96827eecff build: Make all flight sw use pios_board_info_blob
Now that every bootloader build has a board info blob,
make all fw and bl images use it.

The following MACROS are removed:
  BOARD_TYPE, BOARD_REVISION, BOOTLOADER_VERSION,
  START_OF_USER_CODE, HW_TYPE

These values are now ONLY available from the bootloader
flash via the pios_board_info_blob symbol.  These values
must not be #defined or otherwise hard-coded into the
firmware in any way.  The bootloader flash is the only
valid source for this information.

NOTE: To ensure that we have an upgrade path from an
      old bootloader (without board_info_blob) to a
      new bootloader (with board_info_blob), it is
      essential that the bu_* targets do not depend
      on (or validate) the board_info_blob being present
      in the bootloader flash.
2011-05-24 00:58:10 -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
Stacey Sheldon
575010169a build: add pios_board_info_blob struct to bootloader flash image
The board info blob is stored in the last 128 bytes of the
bootloader's flash bank.  You can access this data from the
application firmware like this:
  #include <pios_board_info.h>

  if (pios_board_info_blob.magic == PIOS_BOARD_INFO_BLOB_MAGIC) {
    /* Check some other fields */
  }

DO NOT link pios_board_info.c into your application firmware.
Only bootloaders should provide the content for the board info
structure.  The application firmware is only a user of the data.
2011-05-16 08:30:30 -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
45c609100a OP-483: add install target for bootloaders 2011-05-13 11:25:33 +03: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
7e99419c8a build: Add support for %.bin.o generation
The .bin.o rule places the contents of a raw .bin file
into an .o file wrapped within fixed symbols for start
and end.  This can be used to embed a binary file inside
of an executable.

The symbols for the embedded binary blob are:
 _binary_start
 _binary_end
 _binary_size

NOTE: The way the .bin.o rule is currently written, you
can only embed one binary blob in an executable since the
symbol names will collide if you add multiple blobs.  This
limitation is easily removed later if necessary.
2011-05-07 18:05:50 -04:00
James Cotton
7e98bb42c9 OP-462: Patch from OS to override the debug flag for bootloaders 2011-05-03 12:54:11 -05:00
zedamota
1cc152b4dd More cleaning, moved stopwatch files to library folder, code formatting. 2011-04-29 20:48:13 +01:00
James Cotton
5f776f0b58 Merge branch 'master' into OP-439_CorvusCorax_Bootloader-Makefile-and-OpenOCD-config-for-Linux 2011-04-27 23:41:35 -05: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
Corvus Corax
5d952f81e3 PIOS: BL_HELPER: refactored function names 2011-04-23 21:11:17 +02:00
Corvus Corax
357bc369db PIOS: Bootloader Helper functions should sit in HAL, not duplicated in every single architecture. 2011-04-23 19:40:41 +02:00
edouard
1f88b7f5aa Remove obsolete README files. Obsolete and actually misleading...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@3163 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-04-14 21:00:40 +00:00
sambas
193f9720e5 unix style output dir for all, makes eclipse users happier
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@3042 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-03-15 19:11:56 +00:00
edouard
ae32bae5c7 OP-338: Use the new convention on bcdDevice for the PipXtreme. Also use the new PID for the modem. Careful, this breaks the uploader gadget on the GCS for now!
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@3011 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-03-08 23:57:18 +00:00
osnwt
0210334aa8 OP-305 Preparing the top level Makefile for unix-style Windows build.
- fixed: dep directory problem (sometimes it cannot be created by make, so do it with mkdir);
- fixed: added -f option to all_clean target (or rm stops on Windows for hidden .svn and r/o files);
- fixed: overridden USE_BOOTLOADER var for bootloaders (should always be set to NO regardless of command line);
- verified: short compilation output works as expected.

Some TODOs still exist, see OP-305 comments for details.


git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2918 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-28 10:25:56 +00:00
stac
76fed0387b makefile: refactor bootloader makefiles
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2856 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-23 04:19:00 +00:00
stac
ee3d890bfc makefile: convert to unix line-endings
These files were a mix of line endings.  Now
they're all consistent as LF terminators.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2855 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-23 04:18:56 +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
stac
3b34cc71b4 bl_pipxtreme: bind to new COM driver
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2789 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-14 01:17:42 +00:00
sambas
eb6ebb93d2 Build: last patches for windoes, and output targets
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2586 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-24 20:34:29 +00:00
sambas
ae324ffd6e 3rd for Big Mess, bootloaders and pipxtreme
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2549 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-23 18:51:43 +00:00
edouard
b3ca037308 OP-277 Update all files to use a BOARD_TYPE and BOARD_REVISION scheme through the whole codebase.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2458 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-16 20:41:55 +00:00
zedamota
ad0b3e911d OP-268/PipX Bootloader - Changed Timers for MD device, auto memory space fetching (as per people request ;)). Stripped unused functions to reduce size.
TESTED WORKS.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2431 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-14 15:33:24 +00:00
zedamota
691c58a583 OP-268/PipX Bootloader - Changed the size of BL def.
New naming convention for the linker files:
link_(board_name)_(density)_(bl usage).ld

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2401 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-13 17:34:22 +00:00
zedamota
301d9cddfc OP-268/PipX Bootloader - Trunk integration of Edouard's work.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2399 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-13 15:57:30 +00:00