Comments (9)
Hi Frank,
the way we handle these differences among microcontrollers of the same family is (specifically to your case):
- Add a new target:
LPC11U24_301
- Move the
TARGET_LPC11UXX/TOOLCHAIN_*
directories under:TARGET_LPC11UXX/TARGET_LPC11U24
- 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.
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.
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 from0x1000 0000
to0x1000 1800
for a total of6 Kbytes
as expected. - The
LPC11U24/401
memory goes from0x1000 0000
to0x1000 2000
for a total of8 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:
- Add a new target:
LPC11U24_301
- Move the
TARGET_LPC11UXX/TOOLCHAIN_GCC_ARM/LPC11U24.ld
toTARGET_LPC11UXX/TOOLCHAIN_GCC_ARM/TARGET_LPC11U24/LPC11U24.ld
- 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.
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.
I'll ship the board tomorrow.
To the "Primary Address" or "Captial Park Address"?
Thanks. To the "Primary Address".
Cheers,
Emilio
from mbed-os.
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.
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.
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.
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)
- STM32U5 firmware package need update HOT 4
- Nuvoton M487 ADC Accuracy using AnalogIn() HOT 4
- STLINK-V3 (MINIE) support HOT 2
- CAN API Errors HOT 2
- Running `mbed-tools detect` on mac_os fails when a USB peripheral is missing some data HOT 2
- STM32H7 TCP non functional HOT 4
- invalid value '' in '-std=' in keil exported from mbed os HOT 2
- STM32H743 cannot use all the available RAM HOT 8
- Support for Nucleo H753ZI (again) HOT 5
- Unclear documentation on thread time splitting HOT 1
- Support for STM32 NUCLEO-H563ZI board HOT 2
- STM32G4 hardfault when entering sleep mode in debug mode
- STM32F4 HAL driver is out of date HOT 4
- Missing CDC_SEND_BREAK handling HOT 2
- Host receiving data from USBSerial will timeout if data size is 64 HOT 1
- STM32WL Deep Sleep STOP1 over consumption HOT 2
- TARGET_STM: masking logic for CAN rx interrupt is wrong HOT 2
- Buffer overflow vulnerablilty in MbedOS BLE Cordio stack HOT 2
- STM32WL USART2@2400 not working with every device HOT 6
- STM32WL System Clock differs at boot/reset and after deepsleep HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mbed-os.