LPC54018JxM : flashing internal flash

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC54018JxM : flashing internal flash

1,172 Views
belmontbob59
Contributor IV

Do you have some sample project to flash LPC54018JxM’s internal flash?

 

I’ve downloaded full 54S018M::SDK 2.5.0 but could not find any example.

While browsing SDK builder’s standalone examples for 54S018M; I stumbled upon and downloaded “flashloader” (targeting KEIL IDE); however there is no readme file and the project does not compile, I get the errors below. Please advise.

 

>>> 

*** Using Compiler 'V5.06 update 4 (build 422)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'

Rebuild target 'flashloader release'

compiling external_memory_property_map_LPC54S018M.c...

LPC54S018M/external_memory_property_map_LPC54S018M.c(8): error:  #5: cannot open source input file "property/property.h": No such file or directory

  #include "property/property.h"

LPC54S018M/external_memory_property_map_LPC54S018M.c: 0 warnings, 1 error

compiling bl_flexcomm_spi_irq_config_common.c...

LPC54S018M/bl_flexcomm_spi_irq_config_common.c(8): error:  #5: cannot open source input file "bootloader/bl_context.h": No such file or directory

  #include "bootloader/bl_context.h"

LPC54S018M/bl_flexcomm_spi_irq_config_common.c: 0 warnings, 1 error

compiling bl_flexcomm_usart_irq_config_common.c...

LPC54S018M/bl_flexcomm_usart_irq_config_common.c(8): error:  #5: cannot open source input file "bootloader/bl_context.h": No such file or directory

  #include "bootloader/bl_context.h"

LPC54S018M/bl_flexcomm_usart_irq_config_common.c: 0 warnings, 1 error

compiling bl_flexcomm_i2c_irq_config_common.c...

LPC54S018M/bl_flexcomm_i2c_irq_config_common.c(8): error:  #5: cannot open source input file "bootloader/bl_context.h": No such file or directory

  #include "bootloader/bl_context.h"

LPC54S018M/bl_flexcomm_i2c_irq_config_common.c: 0 warnings, 1 error

compiling memory_map_LPC54S018M.c...

LPC54S018M/memory_map_LPC54S018M.c(8): error:  #5: cannot open source input file "bootloader/bl_context.h": No such file or directory

  #include "bootloader/bl_context.h"

LPC54S018M/memory_map_LPC54S018M.c: 0 warnings, 1 error

compiling peripherals_LPC54S018M.c...

LPC54S018M/peripherals_LPC54S018M.c(8): error:  #5: cannot open source input file "bootloader/bl_context.h": No such file or directory

  #include "bootloader/bl_context.h"

LPC54S018M/peripherals_LPC54S018M.c: 0 warnings, 1 error

compiling key_store_hal_lpc54s018.c...

source/authentication/src/key_store_hal_lpc54s018.c(8): error:  #5: cannot open source input file "bootloader/bl_context.h": No such file or directory

  #include "bootloader/bl_context.h"

source/authentication/src/key_store_hal_lpc54s018.c: 0 warnings, 1 error

compiling bl_app_crc_check.c...

source/bootloader/src/bl_app_crc_check.c(8): error:  #5: cannot open source input file "utilities/fsl_assert.h": No such file or directory

  #include "utilities/fsl_assert.h"

source/bootloader/src/bl_app_crc_check.c: 0 warnings, 1 error

compiling bl_context.c...

source/bootloader/src/bl_context.c(9): error:  #5: cannot open source input file "bootloader/bl_context.h": No such file or directory

  #include "bootloader/bl_context.h"

source/bootloader/src/bl_context.c: 0 warnings, 1 error

compiling autobaud_irq.c...

source/autobaud/autobaud_irq.c(9): error:  #5: cannot open source input file "autobaud/autobaud.h": No such file or directory

  #include "autobaud/autobaud.h"

source/autobaud/autobaud_irq.c: 0 warnings, 1 error

compiling bl_main.c...

source/bootloader/src/bl_main.c(11): error:  #5: cannot open source input file "utilities/fsl_assert.h": No such file or directory

  #include "utilities/fsl_assert.h"

source/bootloader/src/bl_main.c: 0 warnings, 1 error

compiling clock_config_LPC54S018M.c...

LPC54S018M/clock_config_LPC54S018M.c(9): error:  #5: cannot open source input file "bootloader/bl_context.h": No such file or directory

  #include "bootloader/bl_context.h"

LPC54S018M/clock_config_LPC54S018M.c: 0 warnings, 1 error

compiling hardware_init_LPC54S018M.c...

LPC54S018M/hardware_init_LPC54S018M.c(9): error:  #5: cannot open source input file "bootloader/bl_context.h": No such file or directory

  #include "bootloader/bl_context.h"

LPC54S018M/hardware_init_LPC54S018M.c: 0 warnings, 1 error

compiling bl_command.c...

source/bootloader/src/bl_command.c(10): error:  #5: cannot open source input file "bootloader/bootloader.h": No such file or directory

  #include "bootloader/bootloader.h"

source/bootloader/src/bl_command.c: 0 warnings, 1 error

compiling pinmux_utility_lpc.c...

LPC54S018M/pinmux_utility_lpc.c(12): error:  #5: cannot open source input file "bootloader/bl_context.h": No such file or directory

  #include "bootloader/bl_context.h"

LPC54S018M/pinmux_utility_lpc.c: 0 warnings, 1 error

compiling bl_misc.c...

source/bootloader/src/bl_misc.c(8): error:  #5: cannot open source input file "bootloader/bootloader.h": No such file or directory

  #include "bootloader/bootloader.h"

source/bootloader/src/bl_misc.c: 0 warnings, 1 error

compiling system_LPC54S018M.c...

compiling fsl_power.c...

compiling fsl_reset.c...

compiling fsl_common.c...

compiling fsl_inputmux.c...

compiling bl_shutdown_cleanup.c...

source/bootloader/src/bl_shutdown_cleanup.c(10): error:  #5: cannot open source input file "utilities/fsl_rtos_abstraction.h": No such file or directory

  #include "utilities/fsl_rtos_abstraction.h"

source/bootloader/src/bl_shutdown_cleanup.c: 0 warnings, 1 error

compiling bl_tree_root.c...

source/bootloader/src/bl_tree_root.c(9): error:  #5: cannot open source input file "bootloader/bootloader.h": No such file or directory

  #include "bootloader/bootloader.h"

source/bootloader/src/bl_tree_root.c: 0 warnings, 1 error

compiling fsl_crc.c...

compiling key_store.c...

compiling flexcomm_i2c_peripheral_interface.c...

source/bootloader/src/flexcomm_i2c_peripheral_interface.c(10): error:  #5: cannot open source input file "bootloader/bl_context.h": No such file or directory

  #include "bootloader/bl_context.h"

source/bootloader/src/flexcomm_i2c_peripheral_interface.c: 0 warnings, 1 error

compiling bl_exception_handler.c...

compiling fsl_flexcomm.c...

compiling fsl_power_lib.c...

compiling fsl_puf.c...

compiling flexcomm_spi_peripheral_interface.c...

source/bootloader/src/flexcomm_spi_peripheral_interface.c(9): error:  #5: cannot open source input file "utilities/fsl_assert.h": No such file or directory

  #include "utilities/fsl_assert.h"

source/bootloader/src/flexcomm_spi_peripheral_interface.c: 0 warnings, 1 error

compiling fsl_usart.c...

compiling flexcomm_usart_peripheral_interface.c...

source/bootloader/src/flexcomm_usart_peripheral_interface.c(9): error:  #5: cannot open source input file "bootloader/bl_context.h": No such file or directory

  #include "bootloader/bl_context.h"

source/bootloader/src/flexcomm_usart_peripheral_interface.c: 0 warnings, 1 error

compiling usb_osa_bm.c...

compiling usb_hid_msc_peripheral_interface.c...

source/bootloader/src/usb_hid_msc_peripheral_interface.c(9): error:  #5: cannot open source input file "bootloader/bl_context.h": No such file or directory

  #include "bootloader/bl_context.h"

source/bootloader/src/usb_hid_msc_peripheral_interface.c: 0 warnings, 1 error

compiling crc32.c...

source/crc/crc32.c(8): error:  #5: cannot open source input file "crc/crc32.h": No such file or directory

  #include "crc/crc32.h"

source/crc/crc32.c: 0 warnings, 1 error

compiling crc16.c...

source/crc/crc16.c(8): error:  #5: cannot open source input file "crc/crc16.h": No such file or directory

  #include "crc/crc16.h"

source/crc/crc16.c: 0 warnings, 1 error

compiling bl_user_entry.c...

compiling fsl_spi.c...

compiling fsl_i2c.c...

compiling normal_memory.c...

source/memory/src/normal_memory.h(10): error:  #5: cannot open source input file "memory/memory.h": No such file or directory

  #include "memory/memory.h"

source/memory/src/normal_memory.c: 0 warnings, 1 error

compiling device_memory.c...

source/memory/src/device_memory.h(10): error:  #5: cannot open source input file "memory/memory.h": No such file or directory

  #include "memory/memory.h"

source/memory/src/device_memory.c: 0 warnings, 1 error

compiling aes_otp.c...

compiling fsl_gpio.c...

compiling sram_init_lpc.c...

source/memory/src/sram_init_lpc.c(9): error:  #5: cannot open source input file "bootloader/bl_context.h": No such file or directory

  #include "bootloader/bl_context.h"

source/memory/src/sram_init_lpc.c: 0 warnings, 1 error

compiling fsl_gint.c...

compiling fsl_clock.c...

assembling pattern_fill.s...

compiling microseconds_sysclk.c...

source/drivers/microseconds/microseconds_sysclk.c(150): error:  #20: identifier "__WEAK" is undefined

  __WEAK uint32_t microseconds_get_clock(void)

source/drivers/microseconds/microseconds_sysclk.c(150): error:  #101: "uint32_t" has already been declared in the current scope

  __WEAK uint32_t microseconds_get_clock(void)

source/drivers/microseconds/microseconds_sysclk.c(150): error:  #65: expected a ";"

  __WEAK uint32_t microseconds_get_clock(void)

source/drivers/microseconds/microseconds_sysclk.c(164): warning: At end of source:  #12-D: parsing restarts here after previous syntax error

source/drivers/microseconds/microseconds_sysclk.c: 1 warning, 3 errors

compiling serial_packet.c...

source/packet/src/serial_packet.c(10): error:  #5: cannot open source input file "bootloader/bl_context.h": No such file or directory

  #include "bootloader/bl_context.h"

source/packet/src/serial_packet.c: 0 warnings, 1 error

compiling sbloader.c...

source/sbloader/src/sbloader.c(12): error:  #5: cannot open source input file "sbloader/sbloader.h": No such file or directory

  #include "sbloader/sbloader.h"

source/sbloader/src/sbloader.c: 0 warnings, 1 error

compiling spifi_nor_memory.c...

source/memory/src/spifi_nor_memory.c(9): error:  #5: cannot open source input file "bootloader/bootloader.h": No such file or directory

  #include "bootloader/bootloader.h"

source/memory/src/spifi_nor_memory.c: 0 warnings, 1 error

compiling property_lpc.c...

source/property/src/property_lpc.c(10): error:  #5: cannot open source input file "property/property.h": No such file or directory

  #include "property/property.h"

source/property/src/property_lpc.c: 0 warnings, 1 error

compiling memory.c...

source/memory/src/memory.c(10): error:  #5: cannot open source input file "bootloader/bl_context.h": No such file or directory

  #include "bootloader/bl_context.h"

source/memory/src/memory.c: 0 warnings, 1 error

compiling fsl_assert.c...

source/utilities/src/fsl_assert.c(8): error:  #5: cannot open source input file "utilities/fsl_rtos_abstraction.h": No such file or directory

  #include "utilities/fsl_rtos_abstraction.h"

source/utilities/src/fsl_assert.c: 0 warnings, 1 error

compiling fsl_rtos_abstraction.c...

source/utilities/src/fsl_rtos_abstraction.c(8): error:  #5: cannot open source input file "utilities/fsl_assert.h": No such file or directory

  #include "utilities/fsl_assert.h"

source/utilities/src/fsl_rtos_abstraction.c: 0 warnings, 1 error

compiling fsl_spifi.c...

compiling otp.c...

assembling startup_LPC54S018M.s...

compiling fsl_pint.c...

compiling startup.c...

compiling hid_bootloader.c...

source/usb/bm_composite/hid_bootloader.h(13): error:  #5: cannot open source input file "utilities/fsl_rtos_abstraction.h": No such file or directory

  #include "utilities/fsl_rtos_abstraction.h"

source/usb/bm_composite/hid_bootloader.c: 0 warnings, 1 error

compiling msc_disk.c...

source/usb/bm_composite/msc_disk.c(18): error:  #5: cannot open source input file "sbloader/sbloader.h": No such file or directory

  #include "sbloader/sbloader.h"

source/usb/bm_composite/msc_disk.c: 0 warnings, 1 error

compiling composite.c...

source/usb/bm_composite/hid_bootloader.h(13): error:  #5: cannot open source input file "utilities/fsl_rtos_abstraction.h": No such file or directory

  #include "utilities/fsl_rtos_abstraction.h"

source/usb/bm_composite/composite.c: 0 warnings, 1 error

compiling usb_descriptor.c...

source/usb/bm_composite/bootloader_hid_report_ids.h(10): error:  #5: cannot open source input file "packet/command_packet.h": No such file or directory

  #include "packet/command_packet.h"

source/usb/bm_composite/usb_descriptor.c: 0 warnings, 1 error

compiling spifi_nor_flash.c...

compiling usb_device_msc_ufi.c...

compiling usb_device_msc.c...

compiling usb_device_hid.c...

compiling usb_device_class.c...

compiling usb_device_ch9.c...

compiling usb_device_dci.c...

compiling usb_device_lpcip3511.c...

"release\flashloader.out" - 41 Error(s), 1 Warning(s).

Target not created.

Build Time Elapsed:  00:00:05

Labels (1)
0 Kudos
4 Replies

918 Views
jeremyzhou
NXP Employee
NXP Employee

Hi bob belmont ,

Thank you for your interest in NXP Semiconductor products and
for the opportunity to serve you.
It seems a bit weird.
The flashloader demo is compiled well on my site, my Keil is 5.24.1.

pastedImage_1.png

Have a great day,
TIC

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

917 Views
belmontbob59
Contributor IV

I use KEIL 5.22.0.0. Please see attached version of the flashloader.zip I downloaded. It looks like the project's is missing some include path.

Is there a "readme" file on how to use the app ? Is this intended to work with LPC54018JxM's 4MB internal flash ? 

it does not appear  to be, because of the following configuration item in bootloader_config.h

#define BL_FEATURE_HAS_NO_INTERNAL_FLASH (1)

but without any documentation it's hard for me to figure out how to use this firmware.This application appears to rely on a host application to feed it with command and data ? if so which one ?

I am looking for an example to flash LPC54018JxM's internal 4MB flash. Please help.

0 Kudos

917 Views
belmontbob59
Contributor IV

Edit: I believe I figured it out. flashloader is part of the mcu_boot tool chain. I downloaded the full SDK with mcu_boot option checked, and the resulting flashloader (SDK\lpcxpresso54s018m\bootloader_examples) does compile under KEIL V 5.22.0.0 w/o errors.

The standalone example (that one may download via SDK dashboard) that I've attached in my previous post is miss configured and does not compile.

0 Kudos

917 Views
shaozhongliangs
NXP Employee
NXP Employee

Hi belmontbob59@gmail.com,‌

    You can try this sample project:

LPC54018JxM:XIP erase and program internal SPIFI Flash 

0 Kudos