zoukankan      html  css  js  c++  java
  • Booting dircetly into Redlink FW from flash

    Booting dircetly into Redlink FW from flash

    Hello,

    the usual way to use the Redlink FW is a two-step approach:

    • First the MCU of the probe enumerates as a DFU device.
    • Then the Redlink Server downloads the current Redlink FW into SRAM
      and the probe re-enumerates as a different HID device (VID 0x21BD, PID 0006) which is the probe FW.

    This works quite fine, but if your target MCU also boots into USB at the same time the probe boots,
    then the host cannot know which device is the probe and which one is the target.

    In this scenario it would be desirable to flash the (current) Redlink FW once into the internal flash of the probe MCU and then directly boot from flash.
    The probe would then enumerate as the"probe HID" device directly.

    Can this be done easily, i.e. is there a Redlink FW that is relocated for start from internal flash?

    We plan to deploy quite a lot (40+) of these "hard coded debuggers" for edu purposes in two labs.
    The probes are already designed and tested with the LPC4320 (and up) and work fine so far.
    AFAIK they could run on some LPC18xx as well. If so, does this require a different Redlink FW?

    We just use the JTAG debug interface, no SWD, trace port or other fancy stuff.

    Best regards,

    Mike

    First of all, redlink is designed to run on known NXP debug probe hardware only.

    It is only tested on such probes, and we make no guarantees as to its use on other hardware.

    Also redlink firmware will only run LPC43xx, there is no LPC18xx variant.

    But those points aside, if you hardware had SPIFI flash then you should be able to program the image into that -

    the LPC43xx bootloader would download it into RAM on startup). 

    LPCScrypt could be used to do this.

    But there is no redlink firmware build available that could run from internal flash. < run from SRAM always >

    Note that you mention LPC4320 - which of course has no internal flash.

    If you are using internal flash then the simplest solution might be to try using CMSIS-DAP firmware,

    which is designed to programmed and run from flash ......

    http://www.lpcware.com/lpclink2-config-tool

    Regards,
    LPCXpresso Support

    Update: 

    I decided to stick with the Redlink FW, because according to the documentation the CMSIS/DAP version cannot debug the multicore targets.

    So I just wrote a "bootloader stub" residing in internal flash

    • which copies the current Redlink FW (stored in internal flash as a BLOB also) to SRAM,
    • sets up VTOR and the SP for SRAM operation and
    • then jump to the "new" reset vector, i.e. starts the FW.

    Works fine on a LPC4327.

    Our "microboards" now enumerate immediately as "LPCLINK2 redlink" devices

    and work as expected with LPCXpresso as JTAG probes.

    Thanks for your help and clarification even on a project that is well "out of support scope". 

    Regards,

    Mike

    Glad to hear that you now have a solution that works for you.

    You should take note though that the redlink firmware provided with one version of LPCXpresso may not work with,

    or may not provide support for some features, when used with a future LPCXpresso release.

    Thus I would recommend that you update the firmware you have flashed when you update to a new LPCXpresso version.

    Also regarding the CMSIS-DAP firmware for LPC-Link2:

    you are correct that using this firmware you can currently only connect from LPCXpresso to the M4 core inside the LPC43xx parts.

    Allowing connections via CMSIS-DAP to the M0 core(s) is something we do intend to support in a future release LPCXpresso release though.

    Regards,
    LPCXpresso Support

  • 相关阅读:
    潘石屹出售上海外滩金融中心股权 4年没新增投资
    【BZOJ4036】【洛谷3175】【HAOI2015】—按位或(FMT+期望dp)
    信托配资清理“逃生通道”隐情
    中国在移动端的营销水平已超国外
    “土豪”们的新人生模型
    苏宁的逆市“O2O进化论”
    信汇中正领导力打造“必读12篇”之路
    你是否真的需要说声“谢谢”?
    新主管如何快速上手
    雷军和黄章又掐架了 不就是“不服跑个分”嘛
  • 原文地址:https://www.cnblogs.com/shangdawei/p/4799964.html
Copyright © 2011-2022 走看看