Changes between Version 143 and Version 144 of Docs/825gen2/Dev/UpdatingLegacyApps


Ignore:
Timestamp:
11/18/25 09:52:37 (4 days ago)
Author:
Don Wilson
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Docs/825gen2/Dev/UpdatingLegacyApps

    v143 v144  
    575723. 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 [wiki:Docs/Prog/Manual/ApplicationLibraries/lib825ev/File/FindFlashDrive 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.
    5858
    59 24. The 825 Gen2 defaults to 12 hour time which requires AM/PM labels to show the date/time. Legacy 825 indicators defaulted to 24 hour time. Many legacy apps do not allow for enough space to display the AM/PM labels. So slight modification of the date/time display code may be needed to accommodate 12 hour time.
     5924. Some apps may use a fixed outdated file path "/dev/com3" for COM3 serial communications. This should be updated to use the CCommSerial class. For example:
     60{{{#!c++
     61CFile file;
     62file.Open("/dev/com3", "w");
     63if(file.IsOpen()) {
     64   string str = FormatWt(GetGrossWt(1), GetInterval(1), GetDecimal(1), 5) + "\r\n";
     65   file.Write(str);
     66}
     67}}}
     68Update this to:
     69{{{#!c++
     70CCommSerial file(3);
     71if(file.IsOpen()) {
     72   string str = FormatWt(GetGrossWt(1), GetInterval(1), GetDecimal(1), 5) + "\r\n";
     73   file.Send(NULL, (uint8_t*)str.c_str(), str.length());
     74}
     75}}}
     76
     7725. The 825 Gen2 defaults to 12 hour time which requires AM/PM labels to show the date/time. Legacy 825 indicators defaulted to 24 hour time. Many legacy apps do not allow for enough space to display the AM/PM labels. So slight modification of the date/time display code may be needed to accommodate 12 hour time.
    6078{{{#!c++
    6179void ShowDateTime(void)
     
    7694}}}
    7795
    78 25. 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 [https://en.wikipedia.org/wiki/Endianness endianness]. The 825 Gen2 is ARM-64 little-endian, The Legacy 825 is Coldfire big-endian.
    79 
    80 26. Before running the app for debugging from SSH it will often be necessary to create a directory on the 825 Gen2 for the app's data. Check the app header files to confirm the directory the app will use for configuration and data files. (The last part of the directory should normally match the project name and the release build executable name. Some newer apps may automatically check when starting up and create the directory if it does not exist)
     9626. 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 [https://en.wikipedia.org/wiki/Endianness endianness]. The 825 Gen2 is ARM-64 little-endian, The Legacy 825 is Coldfire big-endian.
     97
     9827. Before running the app for debugging from SSH it will often be necessary to create a directory on the 825 Gen2 for the app's data. Check the app header files to confirm the directory the app will use for configuration and data files. (The last part of the directory should normally match the project name and the release build executable name. Some newer apps may automatically check when starting up and create the directory if it does not exist)
    8199{{{
    82100mkdir /mnt/nand/apps/<projectname>
     
    94112}}}
    95113
    96 27. In the VM /srv/nfs/arm825/mnt/nand/apps/<projectname> directory it is helpful to create a script "mktgz.sh" to generate a release package to give to customers to install the app.
     11428. In the VM /srv/nfs/arm825/mnt/nand/apps/<projectname> directory it is helpful to create a script "mktgz.sh" to generate a release package to give to customers to install the app.
    97115{{{
    98116#!/bin/sh