Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - jackking

Pages: [1]
Mark, thanks for the quick reply.  Thanks for confirming that the fixed OCRAM was not meant to be represented in the header.

In the guide (page 21):

It states that FlexRAM can be preconfigured for the application:

In comparison, this one has the desired FlexRAM configuration:
02f8 // first two bytes specify the length
030805ffffff // specify DTC/ITC and OCR bank sizes to be
pre-configured for the application (when not ff)
followed by further ff padding bytes
3 banks to be assigned to DTC, 8 to ITC and 5 to OCR

Does the number of banks include the mandatory 512k OCR banks on the 1062?

For example, in my app I have DTC = 512k, ITC = 0k, OCR = 512k
Would the header.txt be?:
Code: [Select]
02f8                   // first two bytes specify the length
0f000fffffff           // specify DTC/ITC and OCR

Also, in the example the byte count is shorter by than the blank 0xff padding, is this intentional?

oh, searching for that I also see a switch based on the define:
Code: [Select]
#define HS_USB_USES_FS
This seems to work for my purposes also.


I have a USB isolator (ADuM3160) on my design which limits he USB speed to 12 Mbps (FS) for the USB device port. 
The USB host port does not have this limitation.

Is there a way to define the USB ports of the iMX to be fullspeed on just the device port (or any port)?

I tried to change a few defines in iMX.h around line 1172, but it seems to configure both ports simultaneously, and I could not get USB_FS_INTERFACE to build at all.

Code: [Select]
// HSUART configuration
#if defined iMX_RT105X || defined iMX_RT106X
    #define HSUSB_CONTROLLERS   2
    #define HSUSB_CONTROLLERS   1
#define iMX_HSUSB_1             0
#define iMX_HSUSB_2             1

OK, maybe this was obvious, but I didn't see it in the docs...

You need to set the Build Variable specifically for the Embedded Artists board. 

The default is MIMXRT1060, which is the correct part, but for the EA module, it should be iMX_RT1062_EMB_ART

OK,  moving on to building my existing NXP SDK application...

I made the appropriate changes to my application and generated a loadable .bin

Trying to actually load the file with the SerialLoader (via SD Card)  throws an error "File oversized!"

The application is 2.3MB, which should leave plenty of room in flash (4MB - bootLoader area).

I did some searching for the error in the SerialLoader and I see in iMX.h that there is a define:
Code: [Select]
#define APPLICATION_FLASH_AREA_SIZE       (512 * 1024)                   // third area in QSPI flash reserved for firmware upload area
Does this need to be increased to use more of flash for my application?

µTasker general / MacOS version of uTasker utilities?
« on: May 08, 2021, 02:54:15 PM »
Is there a Mac version of uTaskerCombine compiled somewhere?

I did find the Mac version of uTaskerConvert here:, it does look a bit out of date.


I am now trying to build the SerialLoader project on Mac using MCUXpresso.
I will update this post as I move to each step.

For the uTaskerBM_Loader (uTaskerBoot configuration), the post build step is supposed to call generate.bat (which isn't usable on Mac)

I replaced this with the direct call:
Code: [Select]
arm-none-eabi-objcopy -v -O binary "${BuildArtifactFileName}" "${ProjDirPath}/Applications/uTaskerBoot/MCUXpresso_iMX/uTaskerBM_loader/${BuildArtifactFileBaseName}_${TargetBoard}.bin"
I also rewrote this as  You will need to add the arm bin directory to your shell path to do it this way (in ~/.zshrc on Big Sur).  Here is the for uTaskerBoot build config:
Code: [Select]




#rem generate a binary output file
arm-none-eabi-objcopy -v -O binary "uTaskerBM_loader.axf" "$TARGET"

I also rewrote the generate script for uTaskerFallbackLoader and uTaskerSerialLoader, but I could only find a Mac version of uTaskerConvert, not uTaskerCombine...   so this won't completely work (yet?)

Code: [Select]

if [ $2 == "MIMXRT1050" ];






#rem generate a binary output file
arm-none-eabi-objcopy -v -O binary "uTaskerSerialLoader.axf" "$SERIAL_TARGET_DIR/uTaskerSerialLoader.bin"

#rem Encrypt using AES256
$TOOLS_DIR/uTaskerConvert "$SERIAL_TARGET_DIR/uTaskerSerialLoader.bin" "$SERIAL_TARGET_DIR/_temp.bin" $3 $4

#rem Add header and authentication to the encrypted image - this is uploaded to a board programmed with the uTaskerBootLoader [build without iMX_FALLBACK_SERIAL_LOADER]
$TOOLS_DIR/uTaskerConvert "$SERIAL_TARGET_DIR/_temp.bin" "$SERIAL_TARGET_DIR/uTaskerSerialLoaderUpload.bin" -0x9$5 -$6

if [ $1 == "0" ]
 cp "$SERIAL_TARGET_DIR/uTaskerSerialLoaderUpload.bin" "$SERIAL_TARGET_DIR/uTaskerSerialLoaderUpload_$2.bin"

#rem combine the boot loader with the serial loader (fallback loader) - this image is loaded to a fresh board  [build with iMX_FALLBACK_SERIAL_LOADER]
$TOOLS_DIR/uTaskerCombine "$BM_TARGET_DIR/uTaskerBoot_$2.bin" "$SERIAL_TARGET_DIR/uTaskerSerialLoaderUpload.bin" 0x4000 "$SERIAL_TARGET_DIR/uTaskerBootLoaderImage.bin"

#rem - Prepare the Fall-back binary archive or combine the serial loader with the Fall-back loader
if [ $1 == "1" ]
  cp "$SERIAL_TARGET_DIR\uTaskerBootLoaderImage.bin" $TARGET 
  $TOOLS_DIR/uTaskerCombine $TARGET "$SERIAL_TARGET_DIR\uTaskerSerialLoaderUpload_$2.bin" $OFFSET[0x100-FALLBACK_LD] "$SERIAL_TARGET_DIR\uTaskerBootComplete_$2.bin" "$SERIAL_TARGET_DIR\uTaskerBootComplete_$2.hex"

#rem Clean up
rm "$SERIAL_TARGET_DIR\_temp.bin"
rm "$SERIAL_TARGET_DIR\uTaskerSerialLoader.bin"
rm "$SERIAL_TARGET_DIR\uTaskerBootLoaderImage.bin"
rm "$SERIAL_TARGET_DIR\uTaskerSerialLoaderUpload.bin"

Here is the output from the uTaskerFallbackLoader build (as it stands now, it can't complete without uTaskerCombine)

Code: [Select]
09:23:08 **** Incremental Build of configuration uTaskerFallbackLoader for project uTaskerV1.4 ****
make -r -j19 all
Building target: uTaskerSerialLoader.axf
Invoking: MCU Linker
arm-none-eabi-gcc -nostartfiles -Xlinker -Map="" -Xlinker --gc-sections -Xlinker -print-memory-usage -Xlinker --sort-section=alignment -Xlinker --cref -mcpu=cortex-m7 -mfpu=fpv5-sp-d16 -mfloat-abi=hard -mthumb -T iMX_RT_10XX_FlexSPI_NOR_BOOT.ld -L "/Users/jackking/Documents/MCUXpressoIDE_11.2.0/workspace/uTaskerV1.4/Applications/uTaskerSerialBoot/GNU_iMX" -o "uTaskerSerialLoader.axf"  ./uTasker/utFAT/mass_storage.o  ./uTasker/uGLCDLIB/FT_CoPro_Cmds.o ./uTasker/uGLCDLIB/GLCD.o ./uTasker/uGLCDLIB/LCD.o  ./uTasker/MODBUS/MODBUS.o  ./uTasker/DSP.o ./uTasker/Driver.o ./uTasker/GlobalTimer.o ./uTasker/SPI_drv.o ./uTasker/SSC_drv.o ./uTasker/Tty_drv.o ./uTasker/USB_drv.o ./uTasker/Watchdog.o ./uTasker/can_drv.o ./uTasker/crypto.o ./uTasker/eth_drv.o ./uTasker/i2c_drv.o ./uTasker/low_power.o ./uTasker/time_keeper.o ./uTasker/uFile.o ./uTasker/uMalloc.o ./uTasker/uNetwork.o ./uTasker/uTasker.o  ./stack/SSL/wolfssl-3.9.6/w_aes.o  ./stack/SSL/openssl-1.0.2/aes_cbc.o ./stack/SSL/openssl-1.0.2/aes_core.o ./stack/SSL/openssl-1.0.2/cbc128.o  ./stack/SSL/mbedtls-1.3.10/aes_mbedTLS.o ./stack/SSL/mbedtls-1.3.10/sha256_mbedTLS.o  ./stack/PPP/auth.o ./stack/PPP/chap.o ./stack/PPP/chpms.o ./stack/PPP/fsm.o ./stack/PPP/ipcp.o ./stack/PPP/lcp.o ./stack/PPP/lwppp.o ./stack/PPP/magic.o ./stack/PPP/md5.o ./stack/PPP/pap.o ./stack/PPP/ppp_oe.o ./stack/PPP/randm.o ./stack/PPP/vj.o  ./stack/Ethernet.o ./stack/NetBIOS.o ./stack/arp.o ./stack/dhcp.o ./stack/dns.o ./stack/ftp.o ./stack/ftp_client.o ./stack/http.o ./stack/icmp.o ./stack/igmp.o ./stack/ip.o ./stack/ip_utils.o ./stack/mqtt.o ./stack/pop3.o ./stack/ppp.o ./stack/secure_layer.o ./stack/smtp.o ./stack/snmp.o ./stack/tcp.o ./stack/telnet.o ./stack/tftp.o ./stack/udp.o ./stack/webutils.o ./stack/zero_config.o  ./Hardware/iMX/iMX.o  ./Applications/uTaskerSerialBoot/disk_loader.o ./Applications/uTaskerSerialBoot/modbus_app.o ./Applications/uTaskerSerialBoot/serial_loader.o ./Applications/uTaskerSerialBoot/usb_application.o ./Applications/uTaskerSerialBoot/usb_device_loader.o ./Applications/uTaskerSerialBoot/usb_host_loader.o ./Applications/uTaskerSerialBoot/webInterface.o  ./Applications/uTaskerBoot/uTaskerBootLoader.o   
Memory region         Used Size  Region Size  %age Used
       SPI_FLASH:          0 GB         8 MB      0.00%
        SRAM_DTC:       13308 B       128 KB     10.15%
        SRAM_ITC:       39767 B       128 KB     30.34%
         SRAM_OC:          0 GB       128 KB      0.00%
/Applications/MCUXpressoIDE_11.2.0_4120/ide/plugins/ warning: dot moved backwards before `.data_run'
     BOARD_SDRAM:          0 GB        32 MB      0.00%
/Applications/MCUXpressoIDE_11.2.0_4120/ide/plugins/ warning: dot moved backwards before `.data_run'
/Applications/MCUXpressoIDE_11.2.0_4120/ide/plugins/ warning: dot moved backwards before `.data_run'
Finished building target: uTaskerSerialLoader.axf
/Applications/MCUXpressoIDE_11.2.0_4120/ide/plugins/ warning: dot moved backwards before `.data_run'
/Applications/MCUXpressoIDE_11.2.0_4120/ide/plugins/ warning: dot moved backwards before `.data_run'
/Applications/MCUXpressoIDE_11.2.0_4120/ide/plugins/ warning: dot moved backwards before `.data_run'
make --no-print-directory post-build
Performing post-build steps
"/Users/jackking/Documents/MCUXpressoIDE_11.2.0/workspace/uTaskerV1.4/Applications/uTaskerSerialBoot/MCUXpresso_iMX/uTaskerSerialLoader/" 1 MIMXRT1060 "aes256 secret key" "initial vector" 234 a748b6531124
copy from `uTaskerSerialLoader.axf' [elf32-littlearm] to `../Applications/uTaskerSerialBoot/MCUXpresso_iMX/uTaskerSerialLoader/uTaskerSerialLoader.bin' [binary]
      uTaskerConvert V1.11 - supporting encryption, AES256 and Motorola binary format [2M binary support]

      uTaskerConvert V1.11 - supporting encryption, AES256 and Motorola binary format [2M binary support]

/Users/jackking/Documents/MCUXpressoIDE_11.2.0/workspace/uTaskerV1.4/Applications/uTaskerSerialBoot/MCUXpresso_iMX/uTaskerSerialLoader/ line 41: ../Tools/uTaskerCombine: No such file or directory
cp: ../Applications/uTaskerSerialBoot/MCUXpresso_iMX/uTaskerSerialLoader\uTaskerBootLoaderImage.bin: No such file or directory
rm: ../Applications/uTaskerSerialBoot/MCUXpresso_iMX/uTaskerSerialLoader\_temp.bin: No such file or directory
rm: ../Applications/uTaskerSerialBoot/MCUXpresso_iMX/uTaskerSerialLoader\uTaskerSerialLoader.bin: No such file or directory
rm: ../Applications/uTaskerSerialBoot/MCUXpresso_iMX/uTaskerSerialLoader\uTaskerBootLoaderImage.bin: No such file or directory
rm: ../Applications/uTaskerSerialBoot/MCUXpresso_iMX/uTaskerSerialLoader\uTaskerSerialLoaderUpload.bin: No such file or directory
make[1]: [makefile:55: post-build] Error 1 (ignored)

09:23:09 Build Finished. 0 errors, 6 warnings. (took 830ms)


Thanks, I reinstalled the SerialLoader with the .bin file in your post and retried the (software.bin) SD-Card application update from SD Card and it worked!

What is the difference between the one you posted and the one on the EA iMXRT1062 page?


I have started to work with uTasker SerialLoader on an Embedded Artists iMX1062 EVK.  I can successfully write the Serial Loader with MCUBootUtility, but when I place "software.bin" on the SD card and the Loader picks it up, it just stops on "File valid".

If I used the USB-MSD method, by placing the software.bin from the PC on UPLOAD_DISK, then it works correctly.

Any ideas why it wouldn't use the software.bin directly from the SD card?

Here is a video of my entire process:

I am in exactly the same boat. 

I run all my dev on Mac, I even wrote a cocoa app to run all of the sdp/blhost commands directly over USB, but things keep changing, and I can’t keep up with a desktop “updater” for my users. 

Things continually stop working or get locked down with IOKit.  The Windows side was a little easier, but I am not a desktop programmer.

So my hope is that my generic imxrt app can be seamlessly integrated with the uTasker Loader to take the desktop issues out of the equation.

I will try and post any tips I find along the way, and maybe we can from each other’s “journey”!

oh, and don’t update to Big Sur...  MCUXpresso isn’t really ready for it.

I tried a similar path, using Secure Provisioning.
 Looking at the log output, and comparing to MCUBootUtility, the image location is not correct in Secure Provisioning.

 In my case it was 0x60001000 instead of 0x60000000.

 I don’t see a way to change this in Secure Provisioning.

Pages: [1]