Giter Club home page Giter Club logo

Comments (9)

emilmont avatar emilmont commented on July 19, 2024

Hi Frank,
the way we handle these differences among microcontrollers of the same family is (specifically to your case):

  1. Add a new target: LPC11U24_301
  2. Move the TARGET_LPC11UXX/TOOLCHAIN_* directories under: TARGET_LPC11UXX/TARGET_LPC11U24
  3. Create a new directory TARGET_LPC11UXX/TARGET_LPC11U24_301 containing the correct linker script for this new target.

We are happy to accept a pull request with the above changes, but we will not implement them ourself, because we do not have a board with such chip in the office.

Cheers,
Emilio

from mbed-os.

 avatar commented on July 19, 2024

Hi Emilio,

that's no problem, I can send you a board for free, if you like. It is a prototype of my http://www.crazycartridge.org project. You don't need the FPGA and external SRAM, so I would just solder the microcontroller, USB connector, crystal oscillator and the LEDs. But I can create a pull request, too.

Do you have a board with the /401 chip? According to the datasheet, this should not work with the current linker script, because the SRAM starts at 0x1000 1800, but maybe it is mirrored to 0x1000 0000, or a bug in the datasheet? I could order a /401 version with my next parts order to verify it with one of my prototype PCBs. Maybe better if I use this larger version anyway, the price difference for the chip is just 0.21 EUR.

Cheers,

Frank

from mbed-os.

emilmont avatar emilmont commented on July 19, 2024

According to the datasheet, this should not work with the current linker script,
because the SRAM starts at 0x1000 1800

No, I think you are misreading the datasheet at page 15:

  • The LPC11U24/301 memory goes from 0x1000 0000 to 0x1000 1800 for a total of 6 Kbytes as expected.
  • The LPC11U24/401 memory goes from 0x1000 0000 to 0x1000 2000 for a total of 8 Kbytes as expected.

that's no problem, I can send you a board for free, if you like.

Yes, that would save us time. This is the ARM address. (just add my name: Emilio Monti).

Actually, giving another look at the code, the startup file is independent of the memory map, because the start of the stack is passed as a symbol, therefore, I would apply just this change:

  1. Add a new target: LPC11U24_301
  2. Move the TARGET_LPC11UXX/TOOLCHAIN_GCC_ARM/LPC11U24.ld to TARGET_LPC11UXX/TOOLCHAIN_GCC_ARM/TARGET_LPC11U24/LPC11U24.ld
  3. Create a new file TARGET_LPC11UXX/TOOLCHAIN_GCC_ARM/TARGET_LPC11U24_301/LPC11U24.ld containing the correct linker script for this new target.

Cheers,
Emilio

from mbed-os.

 avatar commented on July 19, 2024

You are right, I was confused by the memory map drawing and didn't calculate the numbers, your explanation makes sense.

I'll ship the board tomorrow. To the "Primary Address" or "Captial Park Address"?

Cheers,

Frank

from mbed-os.

emilmont avatar emilmont commented on July 19, 2024

I'll ship the board tomorrow.
To the "Primary Address" or "Captial Park Address"?

Thanks. To the "Primary Address".

Cheers,
Emilio

from mbed-os.

emilmont avatar emilmont commented on July 19, 2024

Hi Frank,
I received the board, thank you.

I added an LPC11U24_301 target: 0843613

This was also interesting for us because it is the first example of two target microcontrollers that are identical apart for the memory size. As you can see, we had just to add a new linker script with the correct RAM memory region length.

Happy hacking,
Emilio

from mbed-os.

 avatar commented on July 19, 2024

Thanks, looks good (but the comment "Linker script for mbed LPC1768" in the linker script is wrong).
BTW: you can keep the board, in case you need it for regression testing someday.

from mbed-os.

speachy avatar speachy commented on July 19, 2024

For what it's worth, this "identical except for RAM/Flash sizes" situation is pretty common -- The microcontrollers I'm most familiar with are the STM32F1 series, and there are five sub-families. Within those sub-families, the only difference from a software perspective is the amount of RAM, flash, and the max clock speed. (Indeed, from a linker perspective, that's the only difference between the entire STM32 line, but obviously packaging makes a difference as to which I/Os are exposed..)

So for my (non-mbed) code, I used a single linker family for the entire STM32F1 family (we had three different targets) instead, running it through CPP with something like -DMCU_FLASH_SIZE=131072.

from mbed-os.

emilmont avatar emilmont commented on July 19, 2024

Hi Solomon,
Yes, starting to use a template for the generation of the "linker script"/"scatter file" is an option we are considering.
I think it will be a natural evolution after we will pass a certain number of targets.

Cheers,
Emilio

from mbed-os.

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.