forked from micropython/micropython
-
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 patch add basic building blocks for nrf9P60. It also includes a secure bootloader which forwards all possible peripherals that are user selectable to become non-secure. After configuring Flash, RAM and peripherals the secure bootloader will jump to the non-secure domain where MicroPython is placed. The minimum size of a secure boot has to be a flash block of 32Kb, hence why the linker scripts are offsetting the main application this much. The RAM offset is set to 128K, to allow for later integration of Nordic Semiconductor's BSD socket library which reserves the range 0x20010000 - 0x2001FFFF.
- Loading branch information
Showing
14 changed files
with
770 additions
and
14 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
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,13 @@ | ||
/* | ||
GNU linker script for NRF9160 NS | ||
*/ | ||
|
||
_flash_size = 1M; | ||
_ram_size = 256K; | ||
_sd_size = 0x00008000; | ||
_sd_ram = 0x00020000; | ||
_fs_size = 80K; | ||
|
||
/* produce a link error if there is not this amount of RAM for these sections */ | ||
_stack_size = 32K; | ||
_minimum_heap_size = 64K; |
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,6 @@ | ||
/* Specify the memory areas */ | ||
MEMORY | ||
{ | ||
FLASH_TEXT (rx) : ORIGIN = 0x00000000, LENGTH = 32K | ||
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 64K | ||
} |
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,29 @@ | ||
// nrf91_prefix.c becomes the initial portion of the generated pins file. | ||
|
||
#include <stdio.h> | ||
|
||
#include "py/obj.h" | ||
#include "py/mphal.h" | ||
#include "pin.h" | ||
|
||
#define AF(af_idx, af_fn, af_unit, af_type, af_ptr) \ | ||
{ \ | ||
{ &pin_af_type }, \ | ||
.name = MP_QSTR_AF ## af_idx ## _ ## af_fn ## af_unit, \ | ||
.idx = (af_idx), \ | ||
.fn = AF_FN_ ## af_fn, \ | ||
.unit = (af_unit), \ | ||
.type = AF_PIN_TYPE_ ## af_fn ## _ ## af_type, \ | ||
.af_fn = (af_ptr) \ | ||
} | ||
|
||
#define PIN(p_pin, p_af, p_adc_num, p_adc_channel) \ | ||
{ \ | ||
{ &pin_type }, \ | ||
.name = MP_QSTR_P ## p_pin, \ | ||
.pin = (p_pin), \ | ||
.num_af = (sizeof(p_af) / sizeof(pin_af_obj_t)), \ | ||
.af = p_af, \ | ||
.adc_num = p_adc_num, \ | ||
.adc_channel = p_adc_channel, \ | ||
} |
Oops, something went wrong.