You are not Logged In!

Difference between revisions of "Public:Building and Debugging Code"

From Illini Solar Car Wiki
Jump to navigation Jump to search
imported>Jonathan
imported>Jonathan
(No difference)

Revision as of 17:24, 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).

  1. Open the required projects (and close all others)
    1. The ONLY things you should have open are:
      1. mbed
      2. common
      3. <your>
    2. Close everything else that is open. You will be very sad if there are build error in other projects that make yours fail.
  2. Set all build configurations to whatever microcontroller is being used (probably LPC1549).

+

File:68 +

  1. Make sure the linker script location for your project is set correctly (on your project).
    1. Right click on the Project you are trying to build > Properties > C/C++ Build > Settings
    2. In "Tool Settings" go to MCU C++ Linker > Managed Linker Script
    3. Make sure that you have:
      1. Script name: -+LPC1549.ld+-
      2. Script path: -+..\..\mbed\libraries\mbed\targets\cmsis\TARGET_NXP\TARGET_LPC15XX\TOOLCHAIN_GCC_CR+-
      3. (If you can't change these uncheck "Manage Linker Script")

+

File:69 +

+

  1. Make sure the compiler language settings are set to the right thing (on mbed, common, and your project) If you don't
    1. Right click on Project > Properties > C/C++ Build Settings>Settings
    2. In "Tool Settings" go to MCU C++ Compiler > Dialect
    3. Language standard settings should be:
      1. For common: -+ISO C++11 (-std=c++11)+-
      2. For mbed: -+ISO C++11 (-std=c++0x)+-

+

File:70 +

  1. 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.
  2. If everything went well, then you now have a compiled binary file that you need to program/debug the microcontroller.

File:71

Flashing/Debugging

Common Problems

Future

  • Support program via CAN