forked from apache/nuttx
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This revises canm230:pnsh in a few ways: adjustion of linker scripts structure, asserting PMP setting results, adjustions of RAM addresses for both k230d and k230 devices. Signed-off-by: Yanfeng Liu <[email protected]>
- Loading branch information
Showing
8 changed files
with
92 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,6 +46,7 @@ | |
/nuttx | ||
/nuttx-* | ||
/nuttx.* | ||
/nuttx_user* | ||
/staging | ||
/tags | ||
/TAGS | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
kernel/nuttx_user* | ||
scripts/*.tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
/**************************************************************************** | ||
* boards/risc-v/k230/canmv230/scripts/ld-protected.mem | ||
* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. The | ||
* ASF licenses this file to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance with the | ||
* License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations | ||
* under the License. | ||
* | ||
****************************************************************************/ | ||
|
||
#include <nuttx/config.h> | ||
|
||
/* Memory layout for ld-protected.script and ld-userland.script | ||
* | ||
* |-CONFIG_RAM_START | ||
* | |-CONFIG_NUTTX_USERSPACE | ||
* +--------+----------+--------+--------+ | ||
* | kflash | uflash | ksram | usram | | ||
* +--------+----------+--------+--------+ | ||
* |>-- FLASH_SIZE ---<|>-- SRAM_SIZE --<| | ||
* | ||
*/ | ||
|
||
#define KFLASH_ADDR (CONFIG_RAM_START) | ||
#define UFLASH_ADDR (CONFIG_NUTTX_USERSPACE) | ||
#define KFLASH_SIZE (UFLASH_ADDR - KFLASH_ADDR) | ||
#define UFLASH_SIZE (KFLASH_SIZE) | ||
|
||
#define FLASH_SIZE (0x100000) /* needs be POT */ | ||
#define SRAM_SIZE (0x200000) /* needs be POT */ | ||
|
||
#if KFLASH_SIZE < 0 | ||
#error "Invalid KFLASH_SIZE!" | ||
#endif | ||
|
||
#if KFLASH_SIZE + UFLASH_SIZE > FLASH_SIZE | ||
#error "Adjust FLASH_SIZE please!" | ||
#endif | ||
|
||
#if CONFIG_RAM_SIZE < FLASH_SIZE + SRAM_SIZE | ||
#error "CONFIG_RAM_SIZE too small?" | ||
#endif | ||
|
||
#define KSRAM_SIZE (SRAM_SIZE / 2) | ||
#define USRAM_SIZE (SRAM_SIZE - KSRAM_SIZE) | ||
|
||
#define KSRAM_ADDR (KFLASH_ADDR + FLASH_SIZE) | ||
#define USRAM_ADDR (KSRAM_ADDR + KSRAM_SIZE) | ||
|
||
MEMORY | ||
{ | ||
kflash (rx) : ORIGIN = KFLASH_ADDR, LENGTH = KFLASH_SIZE | ||
uflash (rx) : ORIGIN = UFLASH_ADDR, LENGTH = UFLASH_SIZE | ||
ksram (rwx) : ORIGIN = KSRAM_ADDR, LENGTH = KSRAM_SIZE | ||
usram (rwx) : ORIGIN = USRAM_ADDR, LENGTH = USRAM_SIZE | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters