Giter VIP home page Giter VIP logo

Comments (14)

ZdenekAster avatar ZdenekAster commented on July 21, 2024

Opentracker use first 128 kB FLASH for code and second 128 kB FLASH for data, library DueFlashStorage write to second 128 kB FLASH. When You use more then 128 kB FLASH for code, you must add this size to addres to write.

from opentracker.

varlux avatar varlux commented on July 21, 2024

Mmm.... now I am curious. If I need different settings......How can I change it?

Thanks

from opentracker.

varlux avatar varlux commented on July 21, 2024

Another question......the first byte for DueFlashStorage is "0" in second bank of flash?!

I am confused.....

from opentracker.

ZdenekAster avatar ZdenekAster commented on July 21, 2024

Yes first byte for DueFlashStore = first byte in second bank of flash = position 0x20000 in all flash range.

from opentracker.

varlux avatar varlux commented on July 21, 2024

Ok....but please let me understand it. If I need more flash for my code, for example 200 KB, how do I teach my mcu and the library? With bossa? With configuration file? Or is it impossible?
Thanks for your time

from opentracker.

ZdenekAster avatar ZdenekAster commented on July 21, 2024

You can use library with from value 73728, its 131072+73728=204800. And size of code when you use opentracker you have to modify boards.txt (folder depends on operating system follow \packages\opentracker\hardware\sam\1.0.3 and linker script flash.ld

from opentracker.

varlux avatar varlux commented on July 21, 2024

mmmm....
I want to test myself.....please check my statements:

If I need 200 KB for my code in Opentracker, I first have to modify file boards.txt and change the line 9 from:

geolink_opentracker.upload.maximum_size=131072

to:

geolink_opentracker.upload.maximum_size=204800

Then I have to modify the file linker_scripts/flash.ld and change the lines 37-38 from:

rom (rx) : ORIGIN = 0x00080000, LENGTH = 0x00020000 /* Flash, 128K /
eeprom (rx) : ORIGIN = 0x000A0000, LENGTH = 0x00020000 /
Flash, 128K */

to:

rom (rx) : ORIGIN = 0x00080000, LENGTH = 0x000000C8 /* Flash, 128K /
eeprom (rx) : ORIGIN = 0x000002C8, LENGTH = 0x00000038 /
Flash, 128K */

From this, DueFlashLibrary will work correctly and it will store data in 56 KB.

Is it correct?
Thanks

from opentracker.

ZdenekAster avatar ZdenekAster commented on July 21, 2024

This values in kilobyte not byte!!! You modify 0x00020000 = 128k
to C8=200bytes......

rom (rx) : ORIGIN = 0x00080000, LENGTH = 0x00032000 /* Flash, 200K /
eeprom (rx) : ORIGIN = 0x000B2000, LENGTH = 0x0000E000 / Flash, 56K */

But DueFlash does not accept this. Library write from A0000, you need add offset 73728 to write correct place in flash....

Datasheet cpu in opentracker http://www.atmel.com/Images/Atmel-11057-32-bit-Cortex-M3-Microcontroller-SAM3X-SAM3A_Datasheet.pdf

from opentracker.

varlux avatar varlux commented on July 21, 2024

Oh my God......sorry for the error. :)
I think you are starting to hate me, but I hope you understand........ I chose OpenTracker because fully customizable. So, if I don't understand it all, then I understand nothing.

I know, DueFlashStorage write from A0000 because patched for OpenTracker, but if I need to customize it WHERE I need to add offset?

Thanks for your patience

from opentracker.

ZdenekAster avatar ZdenekAster commented on July 21, 2024

You can modify DueFlashStorage.h line #define FLASH_START ((byte *)IFLASH1_ADDR) to
#define FLASH_START ((byte *)(IFLASH1_ADDR+73728))
Or modify function in this library...

from opentracker.

varlux avatar varlux commented on July 21, 2024

Thank you professor for your lessons, but now I have another doubt: if DueFlashStorage needs to modify its file DueFlashStorage.h (#define FLASH_START ((byte *)(IFLASH1_ADDR+73728))), WHY modify the file linker_scripts/flash.ld also?

Changes in this file are related to library, or to size of the code?

Thanks

from opentracker.

ZdenekAster avatar ZdenekAster commented on July 21, 2024

flash.ld is information for linker, when linker get over the size of flash, he give an error, it is not necessary...
the normaly all whole flash is for code, in script linker i give information for linker maximum length of code. DueFlashStore it is the same problem, when you not modify this, you risk rewrite your code with data and crash...

from opentracker.

varlux avatar varlux commented on July 21, 2024

Then....I think that to write data over the address 0x20000, I simply add offset in the file DueFlashStorage.h:

#define FLASH_START ((byte *)(IFLASH1_ADDR+offset))

and....If I need to write code over 128KB, I simply change the line 9 of the file board.txt:

geolink_opentracker.upload.maximum_size=max_byte_of_the_code

Are these steps enough for my goal?
And...sorry for ignorance, what is linker?

from opentracker.

ZdenekAster avatar ZdenekAster commented on July 21, 2024

It is ok, and linker flash.ld you must modify too, because linker use only space in this define.

from opentracker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.