Browse Source

[2.0.x][LPC176x] Fix binary linking broken by pio update (#11026)

Chris Pepper 6 years ago
parent
commit
f88adcbfd5

+ 3
- 1
Marlin/src/HAL/HAL_LPC1768/lpc1768_flag_script.py View File

22
 
22
 
23
                     # For MarlinFirmware/U8glib-HAL
23
                     # For MarlinFirmware/U8glib-HAL
24
                     "-IMarlin/src/HAL/HAL_LPC1768/u8g",
24
                     "-IMarlin/src/HAL/HAL_LPC1768/u8g",
25
+                    "-DU8G_HAL_LINKS",
25
 
26
 
26
                     "-MMD",
27
                     "-MMD",
27
                     "-MP",
28
                     "-MP",
48
           "-fno-threadsafe-statics"
49
           "-fno-threadsafe-statics"
49
       ],
50
       ],
50
       LINKFLAGS=[
51
       LINKFLAGS=[
52
+          "-Wl,-Tframeworks/CMSIS/LPC1768/Re-ARM/LPC1768.ld,--gc-sections",
51
           "-Os",
53
           "-Os",
52
           "-mcpu=cortex-m3",
54
           "-mcpu=cortex-m3",
53
           "-mthumb",
55
           "-mthumb",
54
           "--specs=nano.specs",
56
           "--specs=nano.specs",
55
           "--specs=nosys.specs",
57
           "--specs=nosys.specs",
56
-          "-u_printf_float",
58
+          "-u_printf_float"
57
       ],
59
       ],
58
   )
60
   )

+ 1
- 2
frameworks/CMSIS/library.json View File

11
       "src_filter": "+<LPC1768/*>",
11
       "src_filter": "+<LPC1768/*>",
12
       "flags": [
12
       "flags": [
13
         "-ILPC1768/include",
13
         "-ILPC1768/include",
14
-        "-ILPC1768/lib",
15
-        "-Wl,-Tframeworks/CMSIS/LPC1768/Re-ARM/LPC1768.ld,--gc-sections"
14
+        "-ILPC1768/lib"
16
     ]
15
     ]
17
   }
16
   }
18
 }
17
 }

+ 4
- 4
platformio.ini View File

150
 platform          = nxplpc
150
 platform          = nxplpc
151
 board             = lpc1768
151
 board             = lpc1768
152
 board_build.f_cpu = 100000000L
152
 board_build.f_cpu = 100000000L
153
-build_flags       = !python Marlin/src/HAL/HAL_LPC1768/lpc1768_flag_script.py
154
-  ${common.build_flags}
155
-  -DU8G_HAL_LINKS
156
-src_build_flags   = -Wall
153
+# Override default maximum RAM. LPC1768/9 do have 64k, but in 3 blocks (32K, 16K, 16K).
154
+# The first 32k block is used by default, while the others must be specifically targeted.
155
+board_upload.maximum_ram_size = 32768
156
+build_flags       = !python Marlin/src/HAL/HAL_LPC1768/lpc1768_flag_script.py ${common.build_flags}
157
 build_unflags     = -Wall
157
 build_unflags     = -Wall
158
 lib_ldf_mode      = off
158
 lib_ldf_mode      = off
159
 lib_extra_dirs    = frameworks
159
 lib_extra_dirs    = frameworks

Loading…
Cancel
Save