Howto: Flash the MPC5748G board - nanamiwang/openpilot GitHub Wiki
Compiling the project
- First on the MPC5748G DEVKIT board itself set the Jumper (J11) to PIN 2-3 and keep this position. You don't have to set it back. Default is 1-2. If you don't set the Jumper to this position you will not be able to flash it. Setting this jumper makes the board to be powered through OpenSDA interface. (From original manual: Jumper Setting: 2-3: USB powered 5V Supply, through OpenSDA interface).
- Failure message will then be: "Warning: Device is not detected or may be censored. Please check connections or please enter password in GDB server parameters within debug configurations using the flag -uncensoredpassword=n, then restart the debug session.
- Open flexray_adapter project in S32 Development Studio
- Set "Release" configuration as active, then build the project.
- Connect the DEVKIT board to PC via OpenSDA port.
- From "Run" menu, choose "Flash from file".
- From the left tree view, choose "flexray_adapter release"
- Set debug setting to use OpenSDA as the debugger for flashing, find the board in "Port" list.
- Click "Flash" button start flashing, the progress is shown in "Console" page. Sometimes the flashing is slow, just be patient.
- Your board can be used as a FlexRay adapter now.
Flashing using the .elf file
If you got the already compiled firmware you can directly start flashing your DevKit and the procedure is pretty much the same as for the previous case.
Remember to set the Jumper (J11) to PIN 2-3
-
Go to
File > Import
-
Under the
C/C++
selectC/C++ Executable
-
Find the
flash.elf
file and click onFinish
- On your workspace will appear a new project on the
Project Explorer
-
Go to
Run > Flash from file
-
From the left tree view, Create a new configuration - at this point you might not have any and name it
flexray_adapter release
- Set debug setting to use OpenSDA as the debugger for flashing, find the board in "Port" list.
- On the right side of the popup, add a new project by clicking on
Browse
and select the new imported "Project" with the.elf
extension - Click the
Flash
button and have a look at theConsole
for any output.Your board can be used as a FlexRay adapter now.