Toyomasa Watarai
/
test_big-size_program
Test program to generate big ROM size bin file
Diff: main.cpp
- Revision:
- 3:3eae9fc3effb
- Parent:
- 2:4262f7e2aa9e
--- a/main.cpp Tue Apr 28 01:49:03 2015 +0000 +++ b/main.cpp Thu Feb 25 05:28:41 2016 +0000 @@ -3,12 +3,17 @@ DigitalOut myled(LED1); Serial pc(USBTX, USBRX); -#define ARRAY_SIZE (64*1024) -const char data[ARRAY_SIZE] = {0}; - #pragma no_inline -#if defined(TARGET_LPC4337) +#if defined(TARGET_LPC1114) || defined(TARGET_SSCI824) +int foo1(int x) __attribute__((section(".ARM.__at_0x00000FF8"))); +int foo2(int x) __attribute__((section(".ARM.__at_0x00004004"))); +int foo3(int x) __attribute__((section(".ARM.__at_0x00007800"))); +#elif defined(TARGET_HRM1017) || defined(TARGET_TY51822R3) +int foo1(int x) __attribute__((section(".ARM.__at_0x0001C200"))); +int foo2(int x) __attribute__((section(".ARM.__at_0x00020000"))); +int foo3(int x) __attribute__((section(".ARM.__at_0x00023F00"))); +#elif defined(TARGET_LPC4337) int foo1(int x) __attribute__((section(".ARM.__at_0x1A010000"))); int foo2(int x) __attribute__((section(".ARM.__at_0x1A020000"))); int foo3(int x) __attribute__((section(".ARM.__at_0x1A012000"))); @@ -20,17 +25,27 @@ int foo1(int x) __attribute__((section(".ARM.__at_0x00020000"))); int foo2(int x) __attribute__((section(".ARM.__at_0x00030000"))); int foo3(int x) __attribute__((section(".ARM.__at_0x0003B000"))); +#elif defined(TARGET_RZ_A1H) +int foo1(int x) __attribute__((section(".ARM.__at_0x18004000"))); +int foo2(int x) __attribute__((section(".ARM.__at_0x18005000"))); +int foo3(int x) __attribute__((section(".ARM.__at_0x18006000"))); +#elif defined(TARGET_LPC11U35_501) +int foo1(int x) __attribute__((section(".ARM.__at_0x00001000"))); +int foo2(int x) __attribute__((section(".ARM.__at_0x00008000"))); +int foo3(int x) __attribute__((section(".ARM.__at_0x0000F800"))); #else int foo1(int x); int foo2(int x); int foo3(int x); #endif + int main() { - pc.printf("data = %d, %d, %d\n", data[0], data[ARRAY_SIZE/2], data[ARRAY_SIZE - 1]); - pc.printf("foo1(123) = %d\n", foo1(123)); - pc.printf("foo2(123) = %d\n", foo2(123)); - pc.printf("foo3(123) = %d\n", foo3(123)); + pc.printf("\n*** test start ***\n"); + pc.printf("Test : foo1 = %d\n", foo1(123)); + pc.printf("Test : foo2 = %d\n", foo2(123)); + pc.printf("Test : foo3 = %d\n", foo3(123)); + pc.printf("*** test end ***\n"); while(1) { myled = 1; wait(0.2);