Flashing dongle using Visual Studio Code rather than Segger Studio

The following instructions are for using Segger Embedded Studio to flash the dongle.

https://devzone.nordicsemi.com/guides/short-range-guides/b/getting-started/posts/nrf52840-dongle-programming-tutorial

Step 2: Adjust the linker configuration. Set FLASH_START=0x1000 to place the application right above the MBR. You should also set FLASH_SIZE=0xDF000 to make sure that there is room for the bootloader at the end of the flash. Set RAM_START=0x20000008, as the first 8 bytes are used by the MBR for interrupt forwarding and adjust the size accordingly by setting RAM_SIZE=0x3FFF8.

Any advice on how to do the equivalent in Visual Studio Code?  I don't see any similar CONFIG settings in the prj config file. 

Parents
  • Hi,

    Could you tell me what VS Code version you are using?

    Regards,

    Priyanka

  • Is the partition layout in flash done in a completely different way with Zephyr and Visual Studio ?

    I found this file that seems like it might be defining the flash layout

    fstab-stock.dts

    /*
     * Copyright (c) 2019 Nordic Semiconductor ASA
     *
     * SPDX-License-Identifier: Apache-2.0
     */

    /* Flash partition table compatible with Nordic nRF5 bootloader */

    &flash0 {
        partitions {
            compatible = "fixed-partitions";
            #address-cells = <1>;
            #size-cells = <1>;

            /* MCUboot placed after Nordic MBR.
             * The size of this partition ensures that MCUBoot
             * can be built with CDC ACM support and w/o optimizations.
             */
            boot_partition: partition@1000 {
                label = "mcuboot";
                reg = <0x00001000 0x000f000>;
            };

            slot0_partition: partition@10000 {
                label = "image-0";
                reg = <0x00010000 0x00005e000>;
            };
            slot1_partition: partition@6e000 {
                label = "image-1";
                reg = <0x006e000 0x00005e000>;
            };
            storage_partition: partition@cc000 {
                label = "storage";
                reg = <0x000cc000 0x00004000>;
            };
            scratch_partition: partition@d0000 {
                label = "image-scratch";
                reg = <0x000d0000 0x00010000>;
            };

            /* Nordic nRF5 bootloader <0xe0000 0x1c000>
             *
             * In addition, the last and second last flash pages
             * are used by the nRF5 bootloader and MBR to store settings.
             */
        };
    };
Reply
  • Is the partition layout in flash done in a completely different way with Zephyr and Visual Studio ?

    I found this file that seems like it might be defining the flash layout

    fstab-stock.dts

    /*
     * Copyright (c) 2019 Nordic Semiconductor ASA
     *
     * SPDX-License-Identifier: Apache-2.0
     */

    /* Flash partition table compatible with Nordic nRF5 bootloader */

    &flash0 {
        partitions {
            compatible = "fixed-partitions";
            #address-cells = <1>;
            #size-cells = <1>;

            /* MCUboot placed after Nordic MBR.
             * The size of this partition ensures that MCUBoot
             * can be built with CDC ACM support and w/o optimizations.
             */
            boot_partition: partition@1000 {
                label = "mcuboot";
                reg = <0x00001000 0x000f000>;
            };

            slot0_partition: partition@10000 {
                label = "image-0";
                reg = <0x00010000 0x00005e000>;
            };
            slot1_partition: partition@6e000 {
                label = "image-1";
                reg = <0x006e000 0x00005e000>;
            };
            storage_partition: partition@cc000 {
                label = "storage";
                reg = <0x000cc000 0x00004000>;
            };
            scratch_partition: partition@d0000 {
                label = "image-scratch";
                reg = <0x000d0000 0x00010000>;
            };

            /* Nordic nRF5 bootloader <0xe0000 0x1c000>
             *
             * In addition, the last and second last flash pages
             * are used by the nRF5 bootloader and MBR to store settings.
             */
        };
    };
Children
Related