Skip to content

Configure UNO_91H to support PDMC compile #10449

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,19 @@
#if defined(RDA_ICACHE_DISABLE)
#define RDA_CODE_BASE (RDA_FLASH_BASE + RDA_PADDR_OFST)
#else /* RDA_ICACHE_DISABLE */

#if !defined(MBED_APP_START) /* MBED_APP_START */
#define RDA_CODE_BASE (RDA_ICACHE_BASE + RDA_PADDR_OFST)
#else /* MBED_APP_START */
#define RDA_CODE_BASE (MBED_APP_START)
#endif /* MBED_APP_START */

#endif /* RDA_ICACHE_DISABLE */
#define RDA_CODE_SIZE (0x001F4000)

#if !defined(MBED_APP_SIZE)
#define MBED_APP_SIZE (0x1F4000)
#endif
#define RDA_CODE_SIZE (MBED_APP_SIZE)
#define RDA_AHB1_BASE (0x40100000)
#define RDA_MEMC_BASE (RDA_AHB1_BASE + 0x00000)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,20 @@

STACK_SIZE = MBED_BOOT_STACK_SIZE;

#if !defined(MBED_APP_START)
#define MBED_APP_START 0x18001000
#endif

#if !defined(MBED_APP_SIZE)
#define MBED_APP_SIZE 2000K
#endif

/* Linker script to configure memory regions. */
MEMORY
{
/* If ICache is enable, use virtual flash base address */
/* Use partition index: 0 */
FLASH (rx) : ORIGIN = 0x18001000, LENGTH = 2000K
FLASH (rx) : ORIGIN = MBED_APP_START, LENGTH = MBED_APP_SIZE
/* Use partition index: 1 */
/* FLASH (rx) : ORIGIN = 0x181F5000, LENGTH = 2000K */

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@ if (0 == RDA_PARTITION_INDEX) {
if (1 == RDA_ICACHE_DISABLE) {
define symbol RDA_CODE_BASE = RDA_FLASH_BASE + RDA_PADDR_OFST;
} else {
/* MBED_APP_START */
if (!isdefinedsymbol(MBED_APP_START)) {
define symbol RDA_CODE_BASE = RDA_ICACHE_BASE + RDA_PADDR_OFST;
} else {
define symbol RDA_CODE_BASE = MBED_APP_START;
}
}
define symbol RDA_CODE_END = RDA_CODE_BASE + 0x1F3FFF;
define symbol RDA_AHB1_BASE = 0x40100000;
Expand Down
10 changes: 9 additions & 1 deletion targets/TARGET_RDA/TARGET_UNO_91H/flash_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@
#include "flash_data.h"
#include "mbed_critical.h"

#ifndef MBED_ROM_SIZE
#define MBED_FLASH_SIZE 0x100000
#else
//there is 4K BOOTROM at beginning of the flash
#define MBED_FLASH_SIZE (MBED_ROM_SIZE+0x1000)
#endif


// This file is automagically generated

// This is a flash algo binary blob. It is PIC (position independent code) that should be stored in RAM
Expand Down Expand Up @@ -68,7 +76,7 @@ static const sector_info_t sectors_info[] = {
static const flash_target_config_t flash_target_config = {
.page_size = 0x100,
.flash_start = 0x18000000,
.flash_size = 0x100000,
.flash_size = MBED_FLASH_SIZE,
.sectors = sectors_info,
.sector_info_count = sizeof(sectors_info) / sizeof(sector_info_t)
};
Expand Down
8 changes: 8 additions & 0 deletions targets/TARGET_RDA/mbed_rtx.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,12 @@ extern uint32_t Image$$ARM_LIB_HEAP$$ZI$$Length[];
#error "no toolchain defined"
#endif

#if defined(TARGET_UNO_91H)
/* Stack Pointer */
#ifndef INITIAL_SP
#define INITIAL_SP (0x120000UL)
//#define INITIAL_SP (0x1A8000UL)
#endif
#endif

#endif // MBED_MBED_RTX_H
7 changes: 7 additions & 0 deletions targets/targets.json
Original file line number Diff line number Diff line change
Expand Up @@ -8508,6 +8508,13 @@
"UNO_91H": {
"inherits": ["RDA5981X"],
"detect_code": ["8001"],
"components_add": ["FLASHIAP"],
"bootloader_supported": true,
"mbed_ram_start": "0x00100080",
"mbed_ram_size": "0x1ff80",
"mbed_rom_start": "0x18001000",
"mbed_rom_size": "0x1F4000",
"sectors": [[0,4096]],
"overrides": {
"network-default-interface-type" : "WIFI"
}
Expand Down