Reduced scope of many variables since they were being
exposed unnecessarily.
Renamed pios_usb_hid_prop code to pios_usbhook to reflect
the fact that it implements all of the callout functions
that are hooked into the stm32 usb library.
The small bootloaders (CC and PipX) are out of flash space
so their stopwatch implementation has been swapped out for
one based on the DELAY clock that takes about 500 bytes less
of code space.
Identical functionality is preserved.
This allows the spektrum and sbus receiver drivers to bind
directly to the usart layer using a properly exported API
rather than overriding the interrupt handler.
Bytes are now pushed directly from the usart layer into the
com layer without any buffering. The com layer performs all
of the buffering.
A further benefit from this approach is that we can put all
blocking/non-blocking behaviour into the COM layer and not
in the underlying drivers.
Misc related changes:
- Remove obsolete .handler field from irq configs
- Adapt all users of PIOS_COM_* functions to new API
- Fixup callers of PIOS_USB_HID_Init()
The pipxtreme boards use a sector of the on-board flash
for configuration storage. Adjust the memory maps to
reflect this.
The board_info_blob is also extended to include the EE
bank definitions. This should be used by the pipxtreme
firmware rather than determining it based on chip size.
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.
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.
- 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
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.
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.
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.
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
- 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
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
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