Announcement

Collapse
No announcement yet.

Flashing code on uLCD

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Flashing code on uLCD

    Good morning,
    in my uLCD-43DCT I'm using three banks of FLASH: BANK0 for main code, BANK1 for text constants, and BANK2 for routines. I have three separate project and I download thats on the display, in reverse order.
    I need a manner to deploy the entire code in only one step, for production purpouses. It is possible? There is a tool (command line is well too) to do that?

    Best regards,
    Stefano

  • #2
    Scriptc is the tool, it can be found in the C:\Program Files (x86)\4D Labs\4D Workshop 4 IDE\DEP folder

    Sample scripts can be found in this folder C:\Users\Public\Documents\4D Labs\SCRIPTS\4DGL the scripts are text files and contain comments. You will need to run it three times, one for each bank
    Mark

    Comment


    • #3
      Thank you this works fine for PmmC and Flash code. Only a question. There is an example that copy data from an HEX file to uSD card. How I can generate the HEX file?

      Best regards,
      Stefano

      Comment


      • #4
        Hi,
        I have two problems:

        1) With scriptc I can update code and PMMC. But if I want to update drivers?
        2) I use script to load data into the SD card, but I have the error "WriteSectors - Incorrect lenth 0 for record 0". Why?

        Stefano

        Comment


        • #5
          Just give it the driver filename instead (i.e. do the same as you do for PmmCs)

          Not sure about the error, to write sectors scriptc needs to run as administrator, are you doing that?

          If you still have problems, can you show the script command?
          Mark

          Comment


          • #6
            Thank you Mark,
            now I can download firmware correctly.

            About the error yes, I'm using administrator mode to run the script.

            This is the script:

            #Run(Picaso,COM8,115200,5,Wrap)

            $LoadPmmC(pmmcname)

            $LoadPmmC(drvname)

            $4DGLLoadProgram(prjmain,Flash)

            $4DGLAttn
            $WriteSectors(usdfile, 0)
            $4DGLExit

            And this is the script to generate hex file from SD:

            #Run(Picaso,COM8,115200,5,Wrap)
            $timeon
            $readPCuSD(usdfile,usddrive,0,50000) // save the 1st 5000 sectors to file 'sectors.hex'

            Thanks,
            Stefano

            Comment


            • #7
              Have you ever used that command before?

              It was never implemented on Diablo and was removed from Picaso some time ago.

              It would be very slow, what are you using it for?
              Mark

              Comment


              • #8
                Hi Mark,
                no, I didn't use this command before.

                I need to have a single operation to update firmware, download flash data and load images into SD card, this is the simplest way to deploy the entire project in production. No problem with speed, images data are little. Have you an alternative to do that?

                Stefano

                Comment


                • #9
                  The 'usual way' is to either have some file download support in your program and a driving system on your update machine. Alternately a download routine can be written and loading into RAM for execution.

                  There is no other way to do it at the moment.



                  Mark

                  Comment

                  Working...
                  X