1
0
mirror of git://projects.qi-hardware.com/f32xbase.git synced 2025-04-21 12:27:27 +03:00

Use config.h as the main source of configuration data. Fixed some boot.c

glitches.

- fw/boot/boot.c, fw/boot/dfu.c: include config.h for platform defines
- fw/common/Makefile.common: add $(F32XBASE)/fw/common to include search
  path
- fw/boot/boot.c: define dummy for uart_init if no debugging is enabled
- fw/boot/boot.c (PLATFORM_EXIT): typo PLAYFORM_EXIT
- fw/boot/boot.c (run_payload): rename BOOT_SETUP to PLATFORM_SETUP
- fw/boot/dfu.c (device_descriptor): use USB_PRODUCT instead of
  USB_PRODUCT_IDBG_DFU
- fw/boot/config.h: removed for now. Might bring it back later as template.
- fw/boot/version.h: moved to fw/common/
- fw/common/Makefile.system: remove serial setup
This commit is contained in:
Werner Almesberger
2010-08-19 01:01:08 -03:00
parent fcfaec399a
commit 3f5ec8aa9e
6 changed files with 15 additions and 48 deletions

View File

@@ -21,11 +21,17 @@
#include "version.h"
#include "regs.h"
#include "io.h"
#include "uart.h"
#include "usb.h"
#include "dfu.h"
#include "config.h"
#if !defined(CONFIG_DEBUG) && !defined(CONFIG_ERROR) && !defined(CONFIG_PRINTK)
#define uart_init(x)
#endif
/*
* GTA example:
@@ -57,7 +63,7 @@
void run_payload(void)
{
PLAYFORM_EXIT;
PLATFORM_EXIT;
/* No interrupts while jumping between worlds */
EA = 0;
@@ -204,7 +210,7 @@ static void boot_loader(void)
* the GTA01/02, once the system is powered up, IDBG exits this loop.
*/
BOOT_SETUP;
PLATFORM_SETUP;
dfu_init();
usb_init();
@@ -254,7 +260,9 @@ void main(void)
*/
OSCICN |= IFCN0;
uart_init(3);
if (REG0CN & VBSTAT)
boot_loader();
run_payload();