2014-08-27 18:47:31 +02:00
|
|
|
|
/*
|
|
|
|
|
* Copyright (C) 2013, Freie Universitaet Berlin (FUB). All rights reserved.
|
|
|
|
|
*
|
|
|
|
|
* This file is subject to the terms and conditions of the GNU Lesser
|
|
|
|
|
* General Public License v2.1. See the file LICENSE in the top level
|
|
|
|
|
* directory for more details.
|
|
|
|
|
*/
|
2010-09-22 15:10:42 +02:00
|
|
|
|
|
2017-05-23 18:19:52 +02:00
|
|
|
|
#ifndef CPU_CONF_H
|
|
|
|
|
#define CPU_CONF_H
|
2010-09-22 15:10:42 +02:00
|
|
|
|
|
2014-10-13 10:53:20 +02:00
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif
|
|
|
|
|
|
2010-09-22 15:10:42 +02:00
|
|
|
|
/**
|
2020-07-16 16:25:45 +02:00
|
|
|
|
* @ingroup cpu_lpc23xx
|
2010-09-22 15:10:42 +02:00
|
|
|
|
*
|
|
|
|
|
* @{
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @file
|
2020-07-16 16:25:45 +02:00
|
|
|
|
* @brief LPC23XX CPU configuration
|
2010-09-22 15:10:42 +02:00
|
|
|
|
*
|
2014-07-31 20:46:28 +02:00
|
|
|
|
* @author baar
|
2010-09-22 15:10:42 +02:00
|
|
|
|
* @version $Revision$
|
|
|
|
|
*
|
2014-07-31 20:46:28 +02:00
|
|
|
|
* @note $Id$
|
2010-09-22 15:10:42 +02:00
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @name Stdlib configuration
|
|
|
|
|
* @{
|
|
|
|
|
*/
|
2014-07-31 20:46:28 +02:00
|
|
|
|
#define __FOPEN_MAX__ 4
|
|
|
|
|
#define __FILENAME_MAX__ 12
|
2010-09-22 15:10:42 +02:00
|
|
|
|
/** @} */
|
|
|
|
|
|
2020-05-15 11:18:52 +02:00
|
|
|
|
/**
|
|
|
|
|
 * @brief This arch uses the inlined irq API.
|
|
|
|
|
 */
|
|
|
|
|
#define IRQ_API_INLINED (1)
|
|
|
|
|
|
2010-09-22 15:10:42 +02:00
|
|
|
|
/**
|
|
|
|
|
* @name Kernel configuration
|
|
|
|
|
* @{
|
|
|
|
|
*/
|
2019-12-08 22:07:57 +01:00
|
|
|
|
#define THREAD_EXTRA_STACKSIZE_PRINTF (512)
|
2013-07-23 13:42:58 +02:00
|
|
|
|
|
2015-04-28 20:02:05 +02:00
|
|
|
|
#ifndef THREAD_STACKSIZE_DEFAULT
|
2019-12-08 22:07:57 +01:00
|
|
|
|
#define THREAD_STACKSIZE_DEFAULT (1024)
|
2010-09-22 15:10:42 +02:00
|
|
|
|
#endif
|
|
|
|
|
|
2017-01-08 10:52:59 +01:00
|
|
|
|
#ifndef THREAD_STACKSIZE_IDLE
|
2015-04-28 20:02:05 +02:00
|
|
|
|
#define THREAD_STACKSIZE_IDLE (160)
|
2017-01-08 10:52:59 +01:00
|
|
|
|
#endif
|
2010-09-22 15:10:42 +02:00
|
|
|
|
/** @} */
|
|
|
|
|
|
2019-09-25 15:37:24 +02:00
|
|
|
|
/**
|
|
|
|
|
* @name Pthread configuration
|
|
|
|
|
* @{
|
|
|
|
|
*/
|
|
|
|
|
/* The idle stack of '160' is not enough to do the 'msg_receive'.
|
|
|
|
|
* It currently used '164' bytes. */
|
|
|
|
|
#define CONFIG_PTHREAD_REAPER_BASE_STACKSIZE (2*THREAD_STACKSIZE_IDLE)
|
|
|
|
|
/** @} */
|
|
|
|
|
|
2010-09-22 15:10:42 +02:00
|
|
|
|
/**
|
|
|
|
|
* @name Compiler specifics
|
|
|
|
|
* @{
|
|
|
|
|
*/
|
2014-07-31 20:46:28 +02:00
|
|
|
|
#define CC_CONF_INLINE inline
|
|
|
|
|
#define CC_CONF_USED __attribute__((used))
|
|
|
|
|
#define CC_CONF_NONNULL(...) __attribute__((nonnull(__VA_ARGS__)))
|
|
|
|
|
#define CC_CONF_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
|
2010-09-22 15:10:42 +02:00
|
|
|
|
/** @} */
|
|
|
|
|
|
2019-11-25 01:34:38 +01:00
|
|
|
|
/**
|
|
|
|
|
* @brief Attribute for memory sections required by SRAM PUF
|
|
|
|
|
*/
|
|
|
|
|
#define PUF_SRAM_ATTRIBUTES __attribute__((used, section(".noinit")))
|
|
|
|
|
|
2019-12-06 00:06:18 +01:00
|
|
|
|
/**
|
2020-02-07 13:47:52 +01:00
|
|
|
|
* @brief Stack size used for the undefined instruction interrupt stack
|
2019-12-06 00:06:18 +01:00
|
|
|
|
* @{
|
|
|
|
|
*/
|
2020-02-07 13:47:52 +01:00
|
|
|
|
#define UND_STACKSIZE (4)
|
|
|
|
|
/** @} */
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief Stack size used for the abort interrupt stack
|
|
|
|
|
* @{
|
|
|
|
|
*/
|
|
|
|
|
#define ABT_STACKSIZE (4)
|
|
|
|
|
/** @} */
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief Stack size used for the interrupt (ISR) stack
|
|
|
|
|
* @{
|
|
|
|
|
*/
|
2017-01-08 10:52:59 +01:00
|
|
|
|
#ifndef ISR_STACKSIZE
|
2020-02-07 13:47:52 +01:00
|
|
|
|
#define ISR_STACKSIZE (400)
|
2017-01-08 10:52:59 +01:00
|
|
|
|
#endif
|
2020-02-07 13:47:52 +01:00
|
|
|
|
/** @} */
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief Stack size used for the fast interrupt (FIQ) stack
|
|
|
|
|
* @{
|
|
|
|
|
*/
|
|
|
|
|
#define FIQ_STACKSIZE (64)
|
|
|
|
|
/** @} */
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief Stack size used for the supervisor mode (SVC) stack
|
|
|
|
|
* @{
|
|
|
|
|
*/
|
|
|
|
|
#define SVC_STACKSIZE (400)
|
|
|
|
|
/** @} */
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief Stack size used for the user mode/kernel init stack
|
|
|
|
|
* @{
|
|
|
|
|
*/
|
|
|
|
|
#define USR_STACKSIZE (4096)
|
2019-12-06 00:06:18 +01:00
|
|
|
|
/** @} */
|
|
|
|
|
|
2019-12-12 00:31:38 +01:00
|
|
|
|
/**
|
|
|
|
|
* @brief The CPU has 4 blocks of SRAM at different addresses.
|
|
|
|
|
* (primary RAM, USB RAM, Ethernet RAM & Backup RAM)
|
|
|
|
|
*/
|
|
|
|
|
#define NUM_HEAPS (4)
|
|
|
|
|
|
2020-03-16 23:34:51 +01:00
|
|
|
|
/**
|
|
|
|
|
* @brief Memory marked with this attribute is retained during deep sleep
|
|
|
|
|
* and initialized with 0 on cold boot.
|
|
|
|
|
*/
|
|
|
|
|
#define BACKUP_RAM __attribute__((section(".backup.bss")))
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief Memory marked with this attribute is retained during deep sleep
|
|
|
|
|
* and initialized with user provided data on cold boot.
|
|
|
|
|
*/
|
|
|
|
|
#define BACKUP_RAM_DATA __attribute__((section(".backup.data")))
|
|
|
|
|
|
2020-11-27 13:55:49 +01:00
|
|
|
|
/**
|
|
|
|
|
* @brief lpc23xx has non-uniform pages
|
|
|
|
|
*/
|
|
|
|
|
#define PERIPH_FLASHPAGE_CUSTOM_PAGESIZES
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief FLASH base address
|
|
|
|
|
*/
|
|
|
|
|
#define CPU_FLASH_BASE (0x0U)
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief Flash page configuration
|
|
|
|
|
* @{
|
|
|
|
|
*/
|
|
|
|
|
#define PERIPH_FLASHPAGE_NEEDS_FLASHPAGE_ADDR
|
|
|
|
|
#define PERIPH_FLASHPAGE_NEEDS_FLASHPAGE_PAGE
|
|
|
|
|
|
|
|
|
|
#define FLASHPAGE_NUMOF (27)
|
|
|
|
|
#define FLASHPAGE_WRITE_BLOCK_SIZE (256)
|
|
|
|
|
#define FLASHPAGE_WRITE_BLOCK_ALIGNMENT (256)
|
|
|
|
|
/** @} */
|
|
|
|
|
|
2014-10-13 10:53:20 +02:00
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|
2013-12-19 16:48:31 +01:00
|
|
|
|
|
2010-09-22 15:10:42 +02:00
|
|
|
|
/** @} */
|
2017-05-23 18:19:52 +02:00
|
|
|
|
#endif /* CPU_CONF_H */
|