build: Add a main.c, and finish everything. We now build and link!
parent
9478bc2185
commit
6cfcd4e207
@ -1,80 +0,0 @@
|
||||
#ifndef __HW_H
|
||||
#define __HW_H
|
||||
|
||||
/* Configuration */
|
||||
#define USE_CW1200 /* Enable support for wireless module */
|
||||
#define CALIBRATE_LSI /* Calibrate the onboard clock */
|
||||
#define USE_CONSOLE /* Enable the interactive serial console */
|
||||
#define INCLUDE_CONSOLE_HELP
|
||||
#define USE_WDOG /* Enable the watchdog */
|
||||
#define USE_RTC /* Enable the RTC */
|
||||
#define USE_DELAY_TIMER /* Support udelay */
|
||||
#define USE_USART1 /* Enable USART1 (aka "console") */
|
||||
#define USE_RC4_PRNG /* Enable RC4 PRNG */
|
||||
|
||||
#define SLEEP_DELAY_MS 125
|
||||
|
||||
// #define REDUCED_FEATURES
|
||||
|
||||
//#define CLOCK_RATE 64
|
||||
//#define CLOCK_RATE 36
|
||||
//#define CLOCK_RATE 32
|
||||
//#define CLOCK_RATE 24
|
||||
|
||||
#if defined(SPWF01S)
|
||||
#define SG1203
|
||||
#endif
|
||||
|
||||
#if defined(SG1088)
|
||||
#define CLOCK_RATE 36
|
||||
#define DUAL_IMAGE
|
||||
#define STM32_RAM_SIZE (32*1024)
|
||||
#define STM32_FLASH_SIZE (256*1024)
|
||||
#define STM32_FLASH_BOOTLOADER_SIZE 4096
|
||||
#define STM32_FLASH_NVSTATS_OFFSET (250*1024)
|
||||
#define STM32_FLASH_CONFIGDATA_OFFSET (252*1024)
|
||||
#define STM32_FLASH_IMAGE_SIZE (122*1024)
|
||||
|
||||
//#define USE_SPI1
|
||||
#define USE_SPI2
|
||||
//#define USE_SPI3
|
||||
#define USE_USART2 /* Enable USART2 (aka "kraken") */
|
||||
#define USE_WIFI_SPI2
|
||||
#define USE_CRC
|
||||
#define USE_I2C
|
||||
#endif
|
||||
#if defined(SG1203)
|
||||
#define CLOCK_RATE 64
|
||||
#define STM32_RAM_SIZE (64*1024)
|
||||
#define STM32_FLASH_SIZE (512*1024)
|
||||
#define STM32_FLASH_BOOTLOADER_SIZE 8192
|
||||
#define STM32_FLASH_IMAGE_SIZE (480*1024) // 496 w/o certs.
|
||||
|
||||
#define STM32_FLASH_CERTS_SIZE (16*1024)
|
||||
#define STM32_FLASH_CERTS_OFFSET (490*1024)
|
||||
#define STM32_FLASH_NVSTATS_OFFSET (506*1024)
|
||||
#define STM32_FLASH_CONFIGDATA_OFFSET (508*1024)
|
||||
|
||||
#define USE_WIFI_SPI1
|
||||
#define USE_SPI1
|
||||
//#define USE_SPI2
|
||||
#define USE_SPI3
|
||||
#define USE_USART2
|
||||
#define USE_USART3
|
||||
#define USE_CRC
|
||||
#define USE_I2C
|
||||
#define USE_SPI_FLASH
|
||||
|
||||
#define SPI_FLASH_MX25L8005 0xc22014
|
||||
#endif
|
||||
|
||||
//XXX I2C2, ADC0-3, SPI3, DAC, USB?
|
||||
|
||||
#define STM32_FLASH_PAGE_SIZE 2048
|
||||
#define STM32_SRAM_BASE (0x20000000)
|
||||
#define STM32_FLASH_BASE (0x08000000)
|
||||
#define STM32_FLASH_BOOTLOADER_OFFSET 0
|
||||
#define STM32_FLASH_NVDATA_OFFSET (STM32_FLASH_BOOTLOADER_OFFSET + STM32_FLASH_BOOTLOADER_SIZE)
|
||||
#define STM32_FLASH_PRIMARY_OFFSET (STM32_FLASH_BOOTLOADER_OFFSET + STM32_FLASH_BOOTLOADER_SIZE + STM32_FLASH_PAGE_SIZE)
|
||||
|
||||
#endif
|
@ -0,0 +1,14 @@
|
||||
#ifndef __STM32F10X_HW_H
|
||||
#define __STM32F10X_HW_H
|
||||
|
||||
/* Configuration */
|
||||
#define MCU_SRAM_SIZE (64*1024)
|
||||
#define MCU_SRAM_BASE (0x20000000)
|
||||
#define MCU_EXTSRAM_SIZE (0)
|
||||
#define MCU_EXTSRAM_BASE (0x68000000)
|
||||
#define MCU_FLASH_BASE (0x08000000)
|
||||
#define MCU_FLASH_SIZE (512*1024)
|
||||
#define MCU_FLASH_PAGE_SIZE 2048
|
||||
#define MCU_FLASH_IMAGE_SIZE (510*1024)
|
||||
|
||||
#endif
|
@ -0,0 +1,4 @@
|
||||
int main() {
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue