Test program to generate big ROM size bin file

Dependencies:   mbed

Revision:
1:d1898c185d3c
Parent:
0:d7492cf9dab6
Child:
2:4262f7e2aa9e
--- a/main.cpp	Mon Apr 27 13:58:39 2015 +0000
+++ b/main.cpp	Mon Apr 27 14:12:39 2015 +0000
@@ -6,13 +6,19 @@
 #define ARRAY_SIZE (64*1024)
 const char data[ARRAY_SIZE] = {0};
 
-int foo1(int x) __attribute__((section(".ARM.__at_0x1A020000")));
-int foo2(int x) __attribute__((section(".ARM.__at_0x1A012000")));
+#pragma no_inline
+
+#if 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")));
+#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));
     while(1) {
         myled = 1;
         wait(0.2);
@@ -28,5 +34,10 @@
 
 int foo2(int x)
 {
-    return (x-1);
+    return (x+2);
 }
+
+int foo3(int x)
+{
+    return (x+3);
+}