Updating Legacy 825 Apps to run on 825 Gen2
- Run the new 825 development environment VM (Virtual Machine). Open the Eclipse IDE (Integrated Development Environment).
- Select "File" "Import" to import legacy project such as from USB flash. Alternatively, if the project is available in an SVN repository use "File" "New" "Project" "Checkout the projects from an SVN" to checkout the project.
- Right-click on the project in Eclipse and select "Build Configurations", "Manage..."
- Click "New..." and type for the "Name:" input "Debug-ARM825". Select "Copy settings from "Existing configuration - Debug". Click "OK".
- There is now a duplicated build configuration. We will change this configuration to compile for the new 825.
- Right-click on the project and select "Properties...", Select "Settings". Make sure the "Configuration" is selected as "Debug-ARM825" and click the "Tool Settings" tab.
- Some projects might have "Cross Settings" under "Tool Settings". If so change the "Prefix" from "m68k-uclinux-" to "aarch64-none-linux-gnu-" (Be sure to not leave out the final minus sign). If the "Cross Settings" is in the project the following steps 8-11 may then be skipped.
- Select "GCC C++ Compiler". The "Command:" will show "m68k-uclinux-g++". Change this to "aarch64-none-linux-gnu-g++". This changes the compiler to compile for the ARM64 architecture.
- Select "GCC C++ Linker". The "Command:" will show "m68k-uclinux-g++". Change this to "aarch64-none-linux-gnu-g++". This changes the linker to link the project for the ARM64 architecture. Linking is the process of combining the already compiled code modules and libraries to create the executable.
- In some cases the project may also have a "GCC C Compiler". If so change the command to "aarch64-none-linux-gnu-gcc".
- In some cases the project may also have a "GCC Assembler". If so change the command to "aarch64-none-linux-gnu-as".
- Click the "Build Artifact" tab. Change the output prefix to "/srv/nfs/arm825_nand/apps/". This is where the completed app will be placed. Using this path will make it easy to test from an SSH connection into the 825. The "test825" script will automatically mount and select this path.
- Click "Apply".
- Go back to "Tool Settings" and under "GCC C++ Compiler" select "Include paths". Click the green plus icon to add a path. Add the path "/opt/arm64include". If there is a "GCC C Compiler" section also add this path to the includes there.
- Under the "GCC C++ Linker" select "Libraries". If libraries "pthread" and "rt" are not already listed add them. Add "${UI_LIBS}". The "${UI_LIBS}" is a code to use the environment variable "UI_LIBS" in the list. This environment variable is preconfigured in the development VM to specify multiple user interface libraries. Also add lines "${CAIRO_LIBS}" and "${GLIB_LIBS}". These additional libraries allow for improved graphics features and remote control of the app.
- Under "Library search path". Edit existing library paths as appropriate. For example change "${workspace_loc:/lib825ev/Debug}" to "${workspace_loc:/lib825ev/Debug-ARM825}"
- Click the green plus icon and add the library path "/opt/arm64lib"
- Under "GCC C++ Compiler" select "Preprocessor". Click the green plus icon to add the symbol "ARM64=1" This is used for conditional compilation. If there is also a "GCC C Compiler" section select "Preprocessor under that and also add the symbol "ARM64=1".
- Click "Apply and Close".
- Also create a "Release" build. Repeat the steps above from step 3, except name the build configuration "Release-ARM825" and copy the configuration from the "Release" build configuration. For the "Library search path" standard libraries change them to "Release-ARM825". The debug build will output messages from DEBUG_MSG statements in the code on the console. These messages are useful for debugging. These messages will be left out when the release build is compiled. The release build executable will often be a smaller size file and may have improved speed. The release build must also be tested as it is possible for problems to only show up in a release build.
- A few source code changes may be needed for proper operation on the 825 Gen2. If the app has USB import/export features it may use a fixed path "/mnt/fl1" for the USB drive. The USB drive path will not be the same on the 825 Gen2. Search the project for the string "/mnt/fl1" to find any code that should be changed. The library lib825ev has a function called FindFlashDrive for the 825 Gen2 to get the path string. The path may be similar to "/run/media/sda1" but it is best to use the FindFlashDrive function instead of a hard coded path.
- Also (probably rare) if the app communicates with another system by serial port, network, or file import/export that interprets the data content as binary integers, floats, etc... it may be necessary to make changes to account for different endianness. The 825 Gen2 is ARM-64 little-endian, The Legacy 825 is Coldfire big-endian.
Creating a simulator build configuration is also useful. Refer to Simulating 825 Gen2 Apps for information about setting up a simulator build configuration.
Also a next step may be: Updating Legacy Apps to New Look
Last modified
6 weeks ago
Last modified on 10/02/24 11:55:58
Attachments (4)
- 825_id_storage_legacy.png (32.8 KB ) - added by 9 months ago.
- ids_legacy_includes.png (75.7 KB ) - added by 9 months ago.
- arm64_cpp_compiler.png (23.9 KB ) - added by 9 months ago.
- 825ids_legacy_libs.png (82.0 KB ) - added by 9 months ago.
Download all attachments as: .zip
Note:
See TracWiki
for help on using the wiki.