Skip to content

Commit

Permalink
NUC123SD4AN0 -> NUC123 conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
alexclewontin committed Dec 12, 2020
1 parent 7d6e9b8 commit 0b4b1d7
Show file tree
Hide file tree
Showing 16 changed files with 64,786 additions and 214 deletions.
32,378 changes: 32,378 additions & 0 deletions ext/NUC123AE_v1.svd

Large diffs are not rendered by default.

32,352 changes: 32,352 additions & 0 deletions ext/NUC123AN_v1.svd

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
Copyright (C) 2020 Alex Lewontin

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -15,26 +15,27 @@
*/

/*
* NUC123SD4AN0 memory setup.
* NUC123xD4xx0 memory setup.
* 64k ROM, 20k ram
*/
MEMORY
{
flash0 : org = 0x00000000, len = 64k
flash1 : org = 0x00000000, len = 0
flash2 : org = 0x00000000, len = 0
flash3 : org = 0x00000000, len = 0
flash4 : org = 0x00000000, len = 0
flash5 : org = 0x00000000, len = 0
flash6 : org = 0x00000000, len = 0
flash7 : org = 0x00000000, len = 0
ram0 : org = 0x20000000, len = 20k
ram1 : org = 0x00000000, len = 0
ram2 : org = 0x00000000, len = 0
ram3 : org = 0x00000000, len = 0
ram4 : org = 0x00000000, len = 0
ram5 : org = 0x00000000, len = 0
ram6 : org = 0x00000000, len = 0
ram7 : org = 0x00000000, len = 0
flash0 (rx) : org = 0x00000000, len = 64k
flash1 (rx) : org = 0x00000000, len = 0
flash2 (rx) : org = 0x00000000, len = 0
flash3 (rx) : org = 0x00000000, len = 0
flash4 (rx) : org = 0x00000000, len = 0
flash5 (rx) : org = 0x00000000, len = 0
flash6 (rx) : org = 0x00000000, len = 0
flash7 (rx) : org = 0x00000000, len = 0
ram0 (wx) : org = 0x20000000, len = 20k
ram1 (wx) : org = 0x00000000, len = 0
ram2 (wx) : org = 0x00000000, len = 0
ram3 (wx) : org = 0x00000000, len = 0
ram4 (wx) : org = 0x00000000, len = 0
ram5 (wx) : org = 0x00000000, len = 0
ram6 (wx) : org = 0x00000000, len = 0
ram7 (wx) : org = 0x00000000, len = 0
}

/* For each data/text section two region are defined, a virtual region
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# List of the ChibiOS generic NUC123SD4AN0 startup and CMSIS files.
# List of the ChibiOS generic NUC123 startup and CMSIS files.
STARTUPSRC = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/crt1.c

STARTUPASM = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/crt0_v6m.S \
$(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/vectors.S

STARTUPINC = $(CHIBIOS_CONTRIB)/os/common/startup/ARMCMx/devices/NUC123SD4AN0 \
STARTUPINC = $(CHIBIOS_CONTRIB)/os/common/startup/ARMCMx/devices/NUC123 \
$(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/ld \
$(CHIBIOS)/os/common/ext/CMSIS/include \
$(CHIBIOS)/os/common/ext/ARM/CMSIS/Core/Include \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
*/

/**
* @file NUC123SD4AN0/cmparams.h
* @brief ARM Cortex-M0 parameters for the NUC123SD4AN0.
* @file NUC123/cmparams.h
* @brief ARM Cortex-M0 parameters for the NUC123.
*
* @defgroup ARMCMx_NUC123 NUC123SD4AN0 Specific Parameters
* @defgroup ARMCMx_NUC123 NUC123 Specific Parameters
* @ingroup ARMCMx_SPECIFIC
* @details This file contains the Cortex-M0 specific parameters for the
* NUC123SD4AN0 platform.
* NUC123 platform.
* @{
*/

Expand Down Expand Up @@ -57,7 +57,12 @@
/* If the device type is not externally defined, for example from the Makefile,
then a file named board.h is included. This file must contain a device
definition compatible with the vendor include file.*/
#if !defined (NUC123SD4AN0)
#if !defined(NUC123SD4AN0) && !defined(NUC123SC2AN1) && \
!defined(NUC123LD4AN0) && !defined(NUC123LC2AN1) && \
!defined(NUC123ZD4AN0) && !defined(NUC123ZC2AN1) && \
!defined(NUC123SD4AE0) && !defined(NUC123SC2AE1) && \
!defined(NUC123LD4AE0) && !defined(NUC123LC2AE1) && \
!defined(NUC123ZD4AE0) && !defined(NUC123ZC2AE1)
#include "board.h"
#endif

Expand Down
1 change: 0 additions & 1 deletion os/hal/boards/NUTINY-SDK-NUC123-V2.0/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#define NUC123SD4AN0
#define BOARD_NAME "NUTINY SDK NUC123 V2.0"

#define NUC123_LSE_BYPASS TRUE
/*
* Board specific settings.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -385,8 +385,8 @@ static uint32_t enable_pll(uint32_t pllSrc, uint32_t pllFreq)
/** @brief Set Core Clock
*
* @description Set the core system clock some reference speed (Hz).
* This should be between 25MHz and 72MHz for the NUC123SD4AN0.
*
* This should be between 25MHz and 72MHz.
*
* Use either the HXT (exact) or HIRC (nearest using 22.1184MHz)
* as the clock source.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
*/

/**
* @file NUC123SD4AN0/hal_lld.h
* @brief NUC123SD4AN0 HAL subsystem low level driver header.
* @file NUC123/hal_lld.h
* @brief NUC123 HAL subsystem low level driver header.
* @pre This module requires the following macros to be defined in the
* @p board.h file:
* - NUC123_HSECLK.
Expand All @@ -41,12 +41,13 @@
*/
#if defined(NUC123SD4AN0) || defined(__DOXYGEN__)
#define PLATFORM_NAME "NUC123SD4AN0 NUC123 Cortex M0 USB Micro"
#define NUC123xxxANx
#undef NUC123xxxAEx
#else
#error "NUC123 device unsupported or not specified"
#endif

#define NUC123xxxANx
#undef NUC123xxxAEx
/* TODO: Add other NUC123xxxxxx versions */

/** @} */

Expand Down Expand Up @@ -186,8 +187,8 @@
/*
* Configuration-related checks.
*/
#if !defined(NUC123SD4AN0_MCUCONF)
#error "Using a wrong mcuconf.h file, NUC123SD4AN0_MCUCONF not defined"
#if !defined(NUC123_MCUCONF)
#error "Using a wrong mcuconf.h file, NUC123_MCUCONF not defined"
#endif

/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* @file NUMICRO/nuc123_isr.h
* @brief ISR remapper driver header.
*
* @addtogroup NUC123SD4AN0_ISR
* @addtogroup NUC123_ISR
* @{
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/

/**
* @file NUC123SD4AN0/nuc123_registry.h
* @brief NUC123SD4AN0 capabilities registry.
* @file NUC123/nuc123_registry.h
* @brief NUC123 capabilities registry.
*
* @addtogroup HAL
* @{
Expand All @@ -25,16 +25,12 @@
#ifndef NUC123_REGISTRY_H
#define NUC123_REGISTRY_H

#if !defined(NUC123SD4AN0) || defined(__DOXYGEN__)
#define NUC123SD4AN0
#endif

/*===========================================================================*/
/* Platform capabilities. */
/*===========================================================================*/

/**
* @name NUC123SD4AN0 capabilities
* @name NUC123 capabilities
* @{
*/

Expand Down Expand Up @@ -253,13 +249,6 @@
#define NUC123_HAS_CRC TRUE
#define NUC123_CRC_PROGRAMMABLE FALSE

/*
This currently correspond to the header guards, and gets tripped on double inclusion.
This does not seem correct.
#else
#error "NUC123SD4AN0 device not specified"
*/

/** @} */

#endif /* NUC123_REGISTRY_H */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
PLATFORMSRC := $(CHIBIOS)/os/hal/ports/common/ARMCMx/nvic.c \
$(CHIBIOS_CONTRIB)/os/hal/ports/NUMICRO/NUC123SD4AN0/hal_lld.c
$(CHIBIOS_CONTRIB)/os/hal/ports/NUMICRO/NUC123/hal_lld.c

# Required include directories.
PLATFORMINC := $(CHIBIOS)/os/hal/ports/common/ARMCMx \
$(CHIBIOS_CONTRIB)/os/hal/ports/NUMICRO/NUC123SD4AN0 \
$(CHIBIOS_CONTRIB)/os/hal/ports/NUMICRO/NUC123 \
$(CHIBIOS_CONTRIB)/os/hal/ports/NUMICRO/LLD

# Optional platform files.
Expand All @@ -18,4 +18,4 @@ include $(CHIBIOS_CONTRIB)/os/hal/ports/NUMICRO/LLD/USBv1/driver.mk

# Shared variables
ALLCSRC += $(PLATFORMSRC)
ALLINC += $(PLATFORMINC)
ALLINC += $(PLATFORMINC)
153 changes: 0 additions & 153 deletions os/hal/ports/NUMICRO/NUC123SD4AN0/system_NUC123SD4AN0.c

This file was deleted.

Loading

0 comments on commit 0b4b1d7

Please sign in to comment.