Skip to content

Commit

Permalink
MAJOR Initial checkin of the new bootloader (serial free), using the …
Browse files Browse the repository at this point in the history
…new file tree for usb app skeletons. still some work to be done on main.c level control logic
  • Loading branch information
AJM committed Apr 9, 2010
1 parent c093f08 commit 5cef336
Show file tree
Hide file tree
Showing 20 changed files with 876 additions and 1,789 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ usb_mem.c

STM32USBSRCS = $(patsubst %, $(ST_USB)/%,$(_STM32USBSRCS))

SRCS = main.c maple_lib.c maple_usb.c maple_usb_desc.c maple_dfu.c
SRCS = usb.c usb_callbacks.c usb_descriptor.c main.c hardware.c dfu.c


SRC = $(SRCS) $(STM32SRCS) $(STM32USBSRCS)
Expand Down
Empty file added build/.gitignore
Empty file.
43 changes: 43 additions & 0 deletions common.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/* *****************************************************************************
* The MIT License
*
* Copyright (c) 2010 LeafLabs LLC.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
* ****************************************************************************/

/**
* @file common.h
*
* @brief toplevel include for bootloader source files
*
*
*/

#ifndef __COMMON_H
#define __COMMON_H

#include "config.h"
#include "hardware.h"
#include "stm32f10x_type.h"
#include "cortexm3_macro.h"

typedef void (*FuncPtr)(void);

#endif
57 changes: 57 additions & 0 deletions config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/* *****************************************************************************
* The MIT License
*
* Copyright (c) 2010 LeafLabs LLC.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
* ****************************************************************************/

/**
* @file config.h
*
* @brief bootloader settings and macro defines
*
*
*/

#ifndef __CONFIG_H
#define __CONFIG_H

#include "common.h"

#define LED_BANK GPIOA
#define LED 5
#define BLINK_FAST 0x50000
#define BLINK_SLOW 0x100000

#define BUTTON_BANK GPIOC
#define BUTTON 9

#define STARTUP_BLINKS 3
#define BOOTLOADER_WAIT 2

#define USER_CODE_RAM ((u32)0x20000C00)
#define USER_CODE_FLASH ((u32)0x08005000)

#define VEND_ID0 0x10
#define VEND_ID1 0x01
#define PROD_ID0 0x01
#define PROD_ID1 0x10

#endif
Loading

0 comments on commit 5cef336

Please sign in to comment.