[rp20xx][pico-sdk] add some missing / generated headers

- sys/cdefs is wanted for __CONCAT()
- version.h and config_autogen.h are generated by the pico sdk
- config_autogen expects to include board file
- instead define PICO_xyz in target rules.mk
This commit is contained in:
Brian Swetland
2021-02-06 20:26:08 -08:00
committed by Travis Geiselbrecht
parent e65436dca9
commit 9c769f6931
5 changed files with 27 additions and 2 deletions

View File

@@ -0,0 +1,4 @@
// pico sdk expects this to include boards/xyz.h and define PICO_*
// we instead define those via GLOBAL defines in target/pico/rules.mk

View File

@@ -0,0 +1,10 @@
#ifndef _PICO_VERSION_H
#define _PICO_VERSION_H
#define PICO_SDK_VERSION_MAJOR 1
#define PICO_SDK_VERSION_MINOR 0
#define PICO_SDK_VERSION_REVISION 1
#define PICO_SDK_VERSION_STRING "1.0.1"
#endif

View File

@@ -0,0 +1,6 @@
#pragma once
#ifndef __CONCAT
#define __CONCAT1(x,y) x ## y
#define __CONCAT(x,y) __CONCAT1(x,y)
#endif

View File

@@ -12,7 +12,8 @@ ARCH := arm
ARM_CPU := cortex-m0plus
GLOBAL_DEFINES += \
MEMSIZE=$(MEMSIZE)
MEMSIZE=$(MEMSIZE) \
PICO_NO_BINARY_INFO=1
MODULE_SRCS += \
$(LOCAL_DIR)/debug.c \

View File

@@ -5,7 +5,11 @@ MODULE := $(LOCAL_DIR)
PLATFORM := rp20xx
GLOBAL_DEFINES += \
TARGET_HAS_DEBUG_LED=1
TARGET_HAS_DEBUG_LED=1 \
PICO_FLASH_SPI_CLKDIV=2 \
PICO_FLASH_SIZE_BYTES=0x200000 \
PICO_FLOAT_SUPPORT_ROM_V1=1 \
PICO_DOUBLE_SUPPORT_ROM_V1=1
MODULE_SRCS += \
$(LOCAL_DIR)/boot.stage2.S \