This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/AM4379: java.lang.Integer limitation

Part Number: AM4379

Tool/software: Code Composer Studio

I want to load memory using the "loadRaw" function.

The following works if run from the JS Console:

loadRaw(0x82000000, 0, '/path/to/input/file', 64, false)

but the same function call fails if run with dss.sh (i.e. the debug server), with the error:

"org.mozilla.javascript.EvaluatorException: Cannot convert 2181038080 to java.lang.Integer"

So the interpreter accepts a number > 0x80000000 from the JS Console but not from a JS script.

How can this be fixed?

For reference,

Host = Ubuntu 16.04, Linux 4.4.0-189-generic #219-Ubuntu SMP Tue Aug 11 12:26:50 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

Target = AM437x IDK

CCS = Version: 7.4.0.00015

In the CCS JS Console, "help loadRaw" shows:

Description: Load a raw file from the host to target memory. Filesize is automatically determinated and the entire file is loaded.
Syntax: loadRaw(address,page,filename,typeSize,byteSwap)
Arguments:
address - the first address in the block.
page - the memory page, use one of PAGE_X constant.
filename - specifies the name of the file that store the target data.
typeSize - specifies the type size of the data.
byteSwap - force a byte swap of the data before writing to target memory.

  • Hello Chuan,

    Note that the parameter ordering for the DSS loadRaw API is slightly different than the related Scripting Console command.

    The DSS API is:

    public void loadRaw(int nPage,
                        long nAddress,
                        java.lang.String sFilename,
                        int nTypeSize,
                        boolean bByteSwap)

    Note that the memory page is the first parameter, unlike the Scripting Console command (where address is the first parameter)

    Thanks

    ki

  • Thank you ki!