-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RAM too big with LPC11U24.ld linker file #19
Comments
Hi Frank,
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, |
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 |
No, I think you are misreading the datasheet at page 15:
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:
Cheers, |
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 |
Thanks. To the "Primary Address". Cheers, |
Hi Frank, 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 Happy hacking, |
Thanks, looks good (but the comment "Linker script for mbed LPC1768" in the linker script is wrong). |
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. |
Hi Solomon, Cheers, |
Add nrf52 PWM implementation.
Defines for default timeout values
Update Mbed OS compile profiles to include Arm Compiler 6
Fixing bugs in serial API
Update Mbed OS compile profiles to include Arm Compiler 6
I've modified targets.py so that I can compile the mbed libraries with ARM GCC for my LPC11U24 microcontroller. There was a problem in the LPC11U24.ld linker script, which caused interesting problems. I have the LPC11U24FBD48/301 microcontroller. Note the "/301" and see the datasheet (UM10462, Rev. 4.1 — 19 July 2013, page 15). It has 6 kB SRAM, starting at 0x1000 0000. The datasheet says the /401 version has 8 kB SRAM, starting at 0x1000 1800. Maybe would be good if I could specify this for the "-m" parameter for the make.py and build.py scripts.
The new line in LPC11U24.ld, which seems to work (at least no funny 0-bytes anymore when trying a printf("%i", 123)) :
RAM (rwx) : ORIGIN = 0x100000C0, LENGTH = 0x1740
The text was updated successfully, but these errors were encountered: