ESP-IDF: configurations and FLASH programming

Sysprogs forums › Forums › CodeVROOM › ESP-IDF: configurations and FLASH programming

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #37487
    ImHoTep
    Participant

    Hi,

    Thanks for build 0.8.0.391! The Reset Window Layout crash is fixed, and adjusting the layout works better now, although it still doesn’t behave quite as I would expect. Due to time constraints, I’ll leave the layout topic aside for the moment and come back to it later.

    There are two features I really miss compared to VisualGDB, and I’d like to ask whether they are planned:

    1. **Programming without debugging.** In VisualGDB I often use “Program and Start Without Debugging” to quickly flash a change. In CodeVROOM I couldn’t find an equivalent, so I always have to start a debug session just to flash the device. Ideally, this would also work over the UART bootloader (e.g. the ESP-Prog’s serial port) without a JTAG adapter.

    2. **A configuration manager like in VisualGDB.** CodeVROOM offers a Debug/Release selector, but I couldn’t find a way to configure the configurations themselves. For ESP-IDF projects, switching between Debug and Release doesn’t seem to change anything, because both use the same sdkconfig (e.g. the compiler optimization level stays at Debug -Og). In VisualGDB I can create and manage configurations with the Configuration Manager, which is very practical. Are you planning something similar for CodeVROOM, e.g. with a separate sdkconfig per configuration?

    Best regards,
    Thomas

    #37489
    support
    Keymaster

    No problem. Feel free to get back to us with the layout feedback whenever you are ready. We forked this discussion into a separate topic for better tracking.

    Programming without debugging should already work by running “idf.py -B <build directory> flash” in the Smart Terminal, but due to a bug in the menu translation, it was not shown properly for single-target ESP-IDF projects. We have fixed it in this build: CodeVROOM-0.8.0.396.exe. It now appears as a menu command in the project menu. We can also add a command to the debug menu if you believe it makes things more intuitive.

    The debug/release selection currently indeed just affects CMAKE_BUILD_TYPE. The configuration manager from VisualGDB should be fairly straight-forward to port, we just didn’t get to it yet. We will look into it in the next couple of days, and will post another update here.

    #37490
    ImHoTep
    Participant

    Thanks a lot, that’s great news!

    Regarding the Debug menu: what I actually use most in VisualGDB are the two toolbar buttons for quick flashing:

    – “Program ESP32 project into FLASH memory” (flash only)
    – “Build and Program ESP32 project into FLASH memory” (build + flash)

    They are much faster to reach than a menu entry, and they typically use the UART bootloader instead of JTAG. Having the same two buttons in the CodeVROOM toolbar would be my preferred option.

    I’m looking forward to the configuration manager and will test build 0.8.0.396 as soon as I find the time.

    Best regards,
    Thomas

    #37491
    ImHoTep
    Participant

    Hi,

    As promised, here is my layout feedback. Following your explanation, I rearranged everything so that all windows are proper docked tool windows (with their own header, pin and close buttons), not documents.

    **My layout (screenshot 1):**
    – Left: CPU Registers and Peripheral Registers
    – Middle: editor with hello_world_main.c
    – Disassembly as a docked tool window to the right of the editor
    – Far right: a column with Watch, Locals and Auto-Watch

    **After stopping and restarting the debug session (screenshot 2):**
    – The left side and the Watch/Locals/Auto-Watch column are restored correctly. That’s a big improvement compared to my previous test!
    – **Disassembly** is no longer a docked tool window. It appears as a document tab next to hello_world_main.c and SevenSegDriver.S, and the Watch column moves into its place.
    – An additional **Files** window appears on the far right, although it was not open before.
    – **GDB Session** appears as a docked window at the bottom, covering only the left half, with an empty area to its right. It was not visible in my layout either.

    So the remaining issues seem to be the Disassembly window losing its docked state, and windows that were closed (Files, GDB Session) reappearing after the restart.

    I also recorded a short video showing the whole process:

    Please set the video quality manually to the highest setting (gear icon → Quality), as the automatic setting makes the text hard to read.

    Best regards,
    Thomas

    Attachments:
    You must be logged in to view attached files.
    #37494
    support
    Keymaster

    Hi,

    Thanks for the update. We managed to fix most of the issues in this build: CodeVROOM-0.8.0.404.exe

    1. The Files and the Outline tool windows no longer re-appear during debugging once you closed them for that workspace.
    2. There is now a “Program FLASH” toolbar button next to the debug button.
    3. We ported the configuration manager from VisualGDB. You can access it via the configuration dropdown or via Project->Workspace Configurations.

    Regarding other issues:

    1. The disassembly tool window is designed to be interchangeable with the regular source editors. So, it should normally remain a document, not a dock. It will remember the position if you move it to a separate split (sample layout shown here). In general, switching the windows from documents to docks and vice versa doesn’t work well with switching between design/debug layouts. But it shouldn’t normally be needed – both window types can be split and arranged arbitrarily.
    2. Due to historical reasons, VisualGDB needs the GDB Session window to be present (not necessarily visible) during debug sessions. You can move it into an inactive tab, and it won’t pop up unless it needs to display some status/progress message. The status display will eventually be moved to the toolbar, so the window will become optional.
    Attachments:
    You must be logged in to view attached files.
    #37511
    ImHoTep
    Participant

    Hi,

    Thanks a lot for build 0.8.0.404 and for the detailed explanations! Files and Outline no longer reappear, the new “Program FLASH” toolbar button is exactly what I was hoping for, and the configuration manager is a great addition.

    **1. Disassembly window**

    Following your explanation, I tried to place the Disassembly window as a separate split in the document area, next to the source editor (like in your sample layout). However, this doesn’t seem to be possible: during a debug session I can dock it anywhere in the dock areas on the left and right, but not in the editor/document area. I recorded a short video showing what I’m doing:

    Maybe I’m missing the right way to drag it there? Any hint would be appreciated.

    **2. Separate sdkconfig per configuration**

    My goal was simple: Release with “Optimize for size (-Os)”, Debug with “Debug without optimization (-O0)”. I enabled “Separate settings for: Project” for both configurations and set the SDKConfig file to sdkconfig.release (Release) and sdkconfig.debug (Debug). I ran into several problems:

    – When setting the SDKConfig file, CodeVROOM asks whether to copy sdkconfig to sdkconfig.release. That works the first time. But on **every subsequent save** of the project properties it asks again, and the save then fails with an IOException because the file already exists:
    `
    System.IO.IOException: The file “…\sdkconfig.release” already exists.
    at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite, Boolean checkHost)
    at VisualGDB.Common_GUI.WPF.Property_pages.Embedded.ESPIDFProjectPropertyPage.ControllerImpl.ExportSettings(Object a2, uou1 a3)
    at VisualGDB.Common_GUI.Configuration_editors.ProjectPropertiesEditModel…
    at aid2.Save()
    `
    As a result, changes made after the first save cannot be stored at all.
    – If sdkconfig.release.defaults does not exist, saving fails with a FileNotFoundException for that file (similar to the earlier sdkconfig.defaults issue). Creating an empty file works around it.
    – The optimization level I changed in the GUI was written to **sdkconfig.release.defaults** instead of sdkconfig.release. After two attempts, that file contained both CONFIG_COMPILER_OPTIMIZATION_SIZE=y and CONFIG_COMPILER_OPTIMIZATION_PERF=y, i.e. two options of the same choice set to y.

    As a workaround, I edited sdkconfig.release, sdkconfig.release.defaults and sdkconfig.debug by hand. After that, the project properties show the correct optimization level for each configuration.

    Best regards,
    Thomas

    #37513
    support
    Keymaster

    Thanks for the update. The disassembly window glitch looks strange. We tried reproducing it on our side, but could not get anything similar. Please try using this build: CodeVROOM-0.8.0.422.exe.

    If the disassembly issue persists, please try resetting the window layout and dragging the main document again. If it doesn’t trigger the problem, please try dragging other windows, do see if any particular window layout starts triggering this.

    We also fixed the sdkconfig overwriting check and updated the ESP-IDF variable handling, so that it passesboth SDKCONFIG=sdkconfig.release and SDKCONFIG_DEFAULTS=sdkconfig.release.defaults to CMake. This should keep both defaults file and evaluated config file separate for different configurations.

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.