| You are not Logged In! |
Difference between revisions of "Public:Building and Debugging Code"
Jump to navigation
Jump to search
imported>Jonathan |
imported>Jonathan |
||
| Line 1: | Line 1: | ||
| − | + | __NOTOC__ | |
== Getting Started== | == Getting Started== | ||
| Line 6: | Line 6: | ||
* Have MCUXpresso installed and ready to go. See: ((MCUXpresso)) | * Have MCUXpresso installed and ready to go. See: ((MCUXpresso)) | ||
| − | == Building | + | == Building== |
[[File:67|upright 1.0]] # At this point you should have all of the proper projects imported (if the projects don't seem to be imported, try that again). | [[File:67|upright 1.0]] # At this point you should have all of the proper projects imported (if the projects don't seem to be imported, try that again). | ||
| Line 17: | Line 17: | ||
# Set all build configurations to whatever microcontroller is being used (probably LPC1549). | # Set all build configurations to whatever microcontroller is being used (probably LPC1549). | ||
| − | + | + | |
| − | == Debugging== | + | [[File:68|upright 1.0]] + |
| + | # Make sure the linker script location for your project is set correctly (on your project). | ||
| + | ## Right click on the Project you are trying to build > Properties > C/C++ Build > Settings | ||
| + | ## In "Tool Settings" go to MCU C++ Linker > Managed Linker Script | ||
| + | ## Make sure that you have: | ||
| + | ### Script name: -+LPC1549.ld+- | ||
| + | ### Script path: -+..\..\mbed\libraries\mbed\targets\cmsis\TARGET_NXP\TARGET_LPC15XX\TOOLCHAIN_GCC_CR+- | ||
| + | ### (If you can't change these uncheck "Manage Linker Script") | ||
| + | |||
| + | + | ||
| + | |||
| + | [[File:69|upright 1.0]] + | ||
| + | |||
| + | + | ||
| + | # Make sure the compiler language settings are set to the right thing (on mbed, common, and your project) ''If you don't | ||
| + | ## Right click on Project > Properties > C/C++ Build Settings>Settings | ||
| + | ## In "Tool Settings" go to MCU C++ Compiler > Dialect | ||
| + | ## Language standard settings should be: | ||
| + | ###For common: -+ISO C++11 (-std=c++11)+- | ||
| + | ###For mbed: -+ISO C++11 (-std=c++0x)+- | ||
| + | |||
| + | + | ||
| + | |||
| + | [[File:70|upright 1.0]] + | ||
| + | # Build the project (ctrl+b). This will take a while (1-4 mins), especially when doing a full build for the first time. Future, incremental builds, should be faster as you won't need to recompile mbed (the OS) each time. | ||
| + | # If everything went well, then you now have a compiled binary file that you need to program/debug the microcontroller. | ||
| + | |||
| + | [[File:71|70px]] | ||
| + | |||
| + | == Flashing/Debugging== | ||
== Common Problems== | == Common Problems== | ||
Revision as of 17:23, 18 September 2018
Getting Started
- Have the code downloaded locally from Github. See: ((Github Setup))
- Have MCUXpresso installed and ready to go. See: ((MCUXpresso))
Building
File:67 # At this point you should have all of the proper projects imported (if the projects don't seem to be imported, try that again).
- Open the required projects (and close all others)
- The ONLY things you should have open are:
- mbed
- common
- <your>
- Close everything else that is open. You will be very sad if there are build error in other projects that make yours fail.
- The ONLY things you should have open are:
- Set all build configurations to whatever microcontroller is being used (probably LPC1549).
+
File:68 +
- Make sure the linker script location for your project is set correctly (on your project).
- Right click on the Project you are trying to build > Properties > C/C++ Build > Settings
- In "Tool Settings" go to MCU C++ Linker > Managed Linker Script
- Make sure that you have:
- Script name: -+LPC1549.ld+-
- Script path: -+..\..\mbed\libraries\mbed\targets\cmsis\TARGET_NXP\TARGET_LPC15XX\TOOLCHAIN_GCC_CR+-
- (If you can't change these uncheck "Manage Linker Script")
+
File:69 +
+
- Make sure the compiler language settings are set to the right thing (on mbed, common, and your project) If you don't
- Right click on Project > Properties > C/C++ Build Settings>Settings
- In "Tool Settings" go to MCU C++ Compiler > Dialect
- Language standard settings should be:
- For common: -+ISO C++11 (-std=c++11)+-
- For mbed: -+ISO C++11 (-std=c++0x)+-
+
File:70 +
- Build the project (ctrl+b). This will take a while (1-4 mins), especially when doing a full build for the first time. Future, incremental builds, should be faster as you won't need to recompile mbed (the OS) each time.
- If everything went well, then you now have a compiled binary file that you need to program/debug the microcontroller.
Flashing/Debugging
Common Problems
Future
- Support program via CAN