Where to get HEX for the kernel or how to build it ?
The task is to make our own boards based on LPC176*, load the core-HEX there in blank LPC, and then download the application for mbed.
Where to get HEX for the kernel or how to build it ?
It isn’t clear for me what do you mean by “core-HEX”. Nevertheless, you can convert the binary code (.bin) of your program to a hex file (.hex) with the
arm-none-eabi-objcopy utility available in the GNU ARM Embedded Toolchain. For more info see the “Programming” section in Home made mbed board with LPC1768 microcontroller.
Thanks for the reply.
Take for example there is a board “mbed LPC1768”. It already contains the kernel and can only load a small bin with a custom program. In the examples, the LED flashes. The user program is loaded via USB, in .BIN format.
The question is how to load the core into such a board if the processor is “clean”.
I can only load the kernel with HEX. Convert it from .ELF no problem - but where to get it .ELF cores ? How to build it ?
The Mbed LPC1768 board is equipped with CMSIS DAP interface used for program download and debugging. However, you can program a “clean” LPC1768 over the serial interface (USART1) using a simple USB to UART (serial) converter. For more info have a look at the “Home made mbed board with LPC1768 microcontroller” link provided in my first entry.
You can flash a clean (or not clean) LPC176* with a binary (.bin) file over it’s USART1 serial port using the lpc21isp. Use the same procedure and connection as when using the “Flash Magic”.
The LPCmini project can be also helpful. To reduce the costs, for programming the board is equipped with an on-board USB to serial converter connected to the LPC1768’s serial port rather than with a CMSIS DAP interface.
That’s probably the key to my question.
The “mbed LPC1768” chamber is cheaper than the “LPCmini”, since there is no FTDI. And it is reasonable to sew up the core once, even if it is more difficult. And then use it to change USB programs.
In my opinion,
The bare LPC1768 (like in the Home made mbed board with LPC1768) is the cheapest solution. One external “USB to serial converter” can be used to program many such boards. No core firmware is needed because it’s utilizing the bootloader built into each LPC1768 during manufacturing.
A more expensive design is the LPCmini where each board is equipped with it’s own “USB to serial converter”. But on the other hand, it’s a more convenient solution because only a USB cable is needed to program the board. No core firmware is needed because it’s utilizing the bootloader built into each LPC1768 during manufacturing.
The most expensive but on the other hand the most convenient solution is the mbed LPC1768 board equipped with a CMSIS DAP interface. However such desing requires a CMSIS DAP hardware and firmware (you probably call core).
“mbed LPC1768 " contains a hardware CMSIS DAP-just a USB interface connected directly to the processor. Programmatically, mbed-os-example-blinky-* projects for the “LPC1768” target contain CMSIS DAP. Do I understand correctly that CMSIS DAP will work after loading such a project ?
The CMSIS DAP interface (aka DAPLink) requires an additional microprocessor which has to be programmed with a DAPLink firmware. The
mbed-os-example-blinky- and any other programs built for Mbed boards with the Mbed Studio or the online compiler do not contain CMSIS DAP! They are exactly same for all of the above mentioned board designs.
But I can’t buid out how to build a “DAPLink firmware” project for the LPC1768 target using a direct USB or Serial connection.
I can also find a ready -made HEX firmware with “DAPLink firmware”.
The description of “mbed LPC1768” contains a firmware with an extension .if-what kind of format is not known.
If you open the “an additional microprocessor” link provided in my previous entry then you’ll find two directories,
Interface Schematics and
Interface Schematicscontains Eagle PCB design files for three different microcontrollers that can be used to build a DAPLink hardware along with the connections to the LPC1768 (or other mbed boards).
Probesfolder contains information about several available external probes you can purchase and connect or install to your LPC1768 (or other) board.
DAPLink firmware link in my previous entry provides the source code of the DAPLink firmware to be built and downloaded to the microcontroller used for building the DAPLink hardware.
Thank you, I’ve seen your links.
But I really can’t figure it out, I don’t understand. With the schemes, everything is clear - the questions are exactly the construction of the necessary firmware.
I don’t understand what additional fee you are writing about.
The “mbed LPC1768” also has a bootloader installed and it is possible to run applications. I.e. everything is done on one chip and one board.
It’s not a reproach to you - it’s just that I can’t figure it out.
I am not familiar with mbed before and the abstraction level is very complex.
One of the projects wanted to translate to your mbed-but the complexity of the problem, the understanding at the moment does not allow it.
When you say “mbed LPC1768” do you mean this board ?
No. In the photo, the board is our production. we were planning to load mbed into a 1768 CPU. The USB connection is similar to “mbed LPC1768", i.e. the pins are compatible. Thus, we wanted to give customers the opportunity to program the product themselves.
mbed import https://github.com/mbedmicro/DAPLink
pip install virtualenv
mbed config root .
progen generate -t uvision
mbed config ARM_PATH
mbed compile --target mbed_LPC1768 --toolchain GCC_ARM
Compile [ 55.9%]: 6LoWPAN_BorderRouterETHERNET.c
[Fatal Error] Span.h@20,21: algorithm: No such file or directory
[ERROR] In file included from ./mbed-os/features/nfc/nfc/ndef/common/util.h:20:0,
./mbed-os/platform/Span.h:20:21: fatal error: algorithm: No such file or directory
no, the board has a top and a bottom side, and on the bottom there is another µC for the DAP Link:
DAP Link cannot be used with a LPC176x as a bootloader.
The LPC176x has a built in bootloader in ROM, but only for USART programming. There are other LPC controllers with bootloader that implents also USB programming, e.g. LPC13xx or LPC15xx.
I did not see the wiring and the back side of the board “mbed LPC1768”.
To see the schematic of the mbed LPC1768 board:
- Visit mbed LPC168.
- Roll down and in the
Schematics and Data Sheetssection click on the
mbed NXP LPC1768 Schematiclink.
On sheet 1 you’ll find a microcontroller, denoted as
MBED-IF01 IC1, which is used to build the DAPLink interface. It is connected to the USB connector installed on the mbed LPC1768 board and to the main LPC1768 microcontroller shown on sheet 3. Mbed doesn’t show the type of this additional microcontroller installed to build a DAPLink interface but most likely it’s an LPC11U35.
This solution is certainly less efficient and cost-effective and it is unlikely to suit our product.
We will continue to think and consider other solutions. Thank you for the clarification.