Skip to content

Commit 4cbdfb3

Browse files
Ganesh RamachandranGanesh Ramachandran
authored andcommitted
Added MBED_APP_START and SPI pin definitions
1 parent 7d93fb4 commit 4cbdfb3

File tree

4 files changed

+65
-25
lines changed

4 files changed

+65
-25
lines changed

targets/TARGET_TOSHIBA/TARGET_TMPM3HQ/PinNames.h

Lines changed: 35 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -49,23 +49,23 @@ typedef enum {
4949
PU0 = 16 << 3, PU1, PU2, PU3, PU4, PU5,
5050
PV0 = 17 << 3, PV1, PV2, PV3, PV4, PV5, PV6, PV7,
5151

52-
// Other mbed Pin Names
52+
// LED
5353
LED1 = PK4,
5454
LED2 = PK5,
5555
LED3 = PK6,
5656
LED4 = PK7,
5757

5858
// External data bus Pin Names
59-
D0 = PV7,
60-
D1 = PV6,
61-
D2 = PC4,
62-
D3 = PK2,
63-
D4 = PC3,
64-
D5 = PJ0,
65-
D6 = PN0,
66-
D7 = PM6,
67-
D8 = PT0,
68-
D9 = PG2,
59+
D0 = PV7,
60+
D1 = PV6,
61+
D2 = PC4,
62+
D3 = PK2,
63+
D4 = PC3,
64+
D5 = PJ0,
65+
D6 = PN0,
66+
D7 = PM6,
67+
D8 = PT0,
68+
D9 = PG2,
6969
D10 = PT1,
7070
D11 = PT3,
7171
D12 = PT4,
@@ -81,24 +81,43 @@ typedef enum {
8181
A4 = PF6,
8282
A5 = PF7,
8383

84+
// DAC
8485
DAC0 = PG0,
8586
DAC1 = PG1,
8687

8788
// DAP_UART
88-
USBTX = PJ1,
89-
USBRX = PJ2,
89+
USBTX = PJ1,
90+
USBRX = PJ2,
9091
MBEDIF_TXD = USBTX,
9192
MBEDIF_RXD = USBRX,
9293

93-
// Switches
94+
// Push buttons
9495
SW1 = PV0,
9596
SW2 = PV1,
9697
SW3 = PV2,
9798
SW4 = PV3,
9899

100+
// Standardized button names
101+
BUTTON1 = SW1,
102+
BUTTON2 = SW2,
103+
BUTTON3 = SW3,
104+
BUTTON4 = SW4,
105+
106+
// TSPI2
107+
MOSI = D11,
108+
MISO = D12,
109+
SCLK = D13,
110+
CS = D10,
111+
112+
// SD Shield TSPI2
113+
SD_SEL = CS, // Chip select
114+
SD_CLK = SCLK, // SPI clock
115+
SD_MISO = MISO, // Master in Salve out
116+
SD_MOSI = MOSI, // Master out Salve in
117+
99118
// I2C pins
100-
SDA = D14,
101-
SCL = D15,
119+
SDA = D14,
120+
SCL = D15,
102121
I2C_SDA = SDA,
103122
I2C_SCL = SCL,
104123

targets/TARGET_TOSHIBA/TARGET_TMPM3HQ/device/TOOLCHAIN_ARM_STD/tmpm3hqfdfg.sct

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#! armcc -E
2+
13
;; TMPM3HQFDFG scatter file
24

35
;; Vector table starts at 0
@@ -13,9 +15,17 @@
1315

1416
;; Compatible with ISSM model
1517

16-
LR_IROM1 0x00000000 0x80000
18+
#if !defined(MBED_APP_START)
19+
#define MBED_APP_START 0x00000000
20+
#endif
21+
22+
#if !defined(MBED_APP_SIZE)
23+
#define MBED_APP_SIZE 0x00080000
24+
#endif
25+
26+
LR_IROM1 MBED_APP_START MBED_APP_SIZE
1727
{
18-
ER_IROM1 0x00000000 0x80000
28+
ER_IROM1 MBED_APP_START MBED_APP_SIZE
1929
{
2030
*.o (RESET, +First)
2131
*(InRoot$$Sections)

targets/TARGET_TOSHIBA/TARGET_TMPM3HQ/device/TOOLCHAIN_GCC_ARM/tmpm3hqfdfg.ld

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
/* Linker script for Toshiba TMPM3HQ */
22

3+
#if !defined(MBED_APP_START)
4+
#define MBED_APP_START 0x00000000
5+
#endif
6+
7+
#if !defined(MBED_APP_SIZE)
8+
#define MBED_APP_SIZE 512K
9+
#endif
10+
311
/* Linker script to configure memory regions. */
412
MEMORY
513
{
6-
FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 512K
14+
FLASH (rx) : ORIGIN = MBED_APP_START, LENGTH = MBED_APP_SIZE
715
/* 8_byte_aligned((166 + 16) vect * 4 bytes) = 8_byte_aligned(0x2D8) = 0x2D8 */
816
RAM (rwx) : ORIGIN = (0x20000000 + 0x2D8), LENGTH = (64K - 0x2D8)
917
}

targets/TARGET_TOSHIBA/TARGET_TMPM3HQ/device/TOOLCHAIN_IAR/tmpm3hqfdfg.icf

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
11
/*###ICF### Section handled by ICF editor, don't touch! ****/
22
/*-Editor annotation file-*/
33
/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
4+
5+
if (!isdefinedsymbol(MBED_APP_START)) { define symbol MBED_APP_START = 0x00000000; }
6+
if (!isdefinedsymbol(MBED_APP_SIZE)) { define symbol MBED_APP_SIZE = 0x00080000; }
7+
48
/*-Specials-*/
5-
define symbol __ICFEDIT_intvec_start__ = 0x00000000;
9+
define symbol __ICFEDIT_intvec_start__ = MBED_APP_START;
610
/*-Memory Regions-*/
7-
define symbol __ICFEDIT_region_ROM_start__ = 0x00000000;
8-
define symbol __ICFEDIT_region_ROM_end__ = 0x0007FFFF;
9-
define symbol __ICFEDIT_region_RAM_start__ = 0x200002D8;
10-
define symbol __ICFEDIT_region_RAM_end__ = 0x2000FFFF;
11+
define symbol __ICFEDIT_region_ROM_start__ = MBED_APP_START;
12+
define symbol __ICFEDIT_region_ROM_end__ = MBED_APP_START + MBED_APP_SIZE - 1;
13+
define symbol __ICFEDIT_region_RAM_start__ = 0x200002D8;
14+
define symbol __ICFEDIT_region_RAM_end__ = 0x2000FFFF;
1115
/*Heap 1/4 of ram and stack 1/8*/
1216
define symbol __ICFEDIT_size_cstack__ = 0x400;
1317
define symbol __ICFEDIT_size_heap__ = 0x2000;
1418
/**** End of ICF editor section. ###ICF###*/
1519

16-
1720
define memory mem with size = 4G;
1821
define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
1922
define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];

0 commit comments

Comments
 (0)