wtywtykk

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 20 total)
  • Author
    Posts
  • wtywtykk
    Participant

    Ok, my solution to this problem:

    `

    get_target_property(BSP_COMPILE_OPTIONS BSP COMPILE_OPTIONS)
    message(“Making compile flags global: ${BSP_COMPILE_OPTIONS}”)
    add_compile_options(${BSP_COMPILE_OPTIONS})

    `

    wtywtykk
    Participant

    Hi,

    I looked through add_bsp_based_executable, but didn’t find the CFLAGS, seems it’s inheriting the CFLAGS from BSP by target_link_libraries. I don’t want to use target_link_libraries because it exposes many unrelated bsp files to my library.

    So I looked into find_bsp, it’s using _core_cflags to pass the flags, but it seems the variable is private. I added the following lines after find_bsp. It’s not printing anything.

    message(STATUS “_core_cflags = ${_core_cflags}”)

    Any idea about that? I don’t fully understand what the bsp code is doing, correct me if I’m wrong.

     

    in reply to: Unpause ARM Semihosting Console after restart? #36745
    wtywtykk
    Participant

    Hi, Thanks for your reply, but the installer doesn’t look like a valid exe file. I can’t run it.

    Os info:

    Edition Windows 10 Pro
    Version 2009
    Installed on ‎4/‎16/‎2021
    OS Build 19045.5965

    in reply to: Unpause ARM Semihosting Console after restart? #36678
    wtywtykk
    Participant

    Hi,

    To clearify, by “restart” I mean the blue button from VS. and “reset” is the green button added by visual gdb.

    My problem happens when I click “restart” (the one from VS). And I agree “reset” shouldn’t clear the content.

     

    After some digging, I found the old content is actually cleared. What it not cleared it the content that received/buffered after I pause the window. They are shown to the window immeidately after unpause. I think this is not expected.

     

    Reproduce:

    1. write a program that prints strng in main with some interval
    2. start the program, the string is shown in semihosting window
    3. pause the window, wait for a while
    4. restart the debugging(by the restart button or by stop then launch)
    5. quickly unpause
    6. you can see the data before restarting is added to the beginning.

     

    Some other problems:

    1. when reading the semihosting with “gets”, restarting will show a error message “Object reference not set to an instance of an object.”
    2. resetting during reading will cause the semihosting to stuck/show some garbage data.

     

    reproduce:

    1. run the following code. This program echos back the input line.
    
    for (;;)
    {
    HAL_GPIO_WritePin(GPIOC, GPIO_PIN_12, GPIO_PIN_SET);
    HAL_Delay(500);
    HAL_GPIO_WritePin(GPIOC, GPIO_PIN_12, GPIO_PIN_RESET);
    HAL_Delay(500);
    puts("aaa\n");
    char bb[128];
    gets(bb);
    puts(bb);
    }

    2. the program should wait for input from semihosting

    3. reset the mcu (if end debugging here, “Object reference not set to an instance of an object.” is shown)

    4. type something

    5. the mcu is stuck at gets (no echo is showed after pressing enter)

     

    Thanks!

     

     

    • This reply was modified 7 months, 3 weeks ago by wtywtykk.
    • This reply was modified 7 months, 3 weeks ago by wtywtykk.
    in reply to: Bootloader project with separatre config file #36018
    wtywtykk
    Participant

    Hi,

    I want to use different config for the applications. So I use multiple find_bsp with different ALIAS. Is this the preferred way?

    Also could you point out where “VS properties for the BSP item in Solution Explorer” is? I can’t find it in the property window(Right click->properties).

    Regards,

    Tianyi

    in reply to: Remote debugging with custom GDB stub #33164
    wtywtykk
    Participant

    Hi,

    My problem can be solved by using port 22.

    The following is my environment.

    Visual GDB version is 5.6R8

    I’m using Embedded project, with a custom BSP. But the problem can be reproduced from regular STM32 BSP.

    QEMU is the latest source code built with

    ../configure –enable-debug –disable-werror –target-list=”arm-softmmu” –without-default-features –enable-user

    The config for remote gdb stub is in the first floor.

    And here’s a video of the steps to reproduce the issue.

    https://1drv.ms/v/s!AkqxTizATCPayyqgHT9qXiSJ8gyr?e=3T4Sjb

    in reply to: Remote debugging with custom GDB stub #33145
    wtywtykk
    Participant

    Seems that in full-custom mode I have to launch QEMU by myself or by some script since it only runs gdbstub on local computer.

    But anyway, I’ve solved the problem by changing the SSH port to 22, so I can connect without the port in host name.

    in reply to: Remote debugging with custom GDB stub #33133
    wtywtykk
    Participant

    Hi,

    The public key is caused by ssh server config. And it’s working now.

    For the target selection command, I’m still having trouble with “full-custom mode”. The target is always “local computer”. If I change it to SSH, it reverts to local computer when I click “Apply”.

    Thanks

    Attachments:
    You must be logged in to view attached files.
    wtywtykk
    Participant

    Great! It works!

    wtywtykk
    Participant

    Hi,

    I added

    <PropertyGroup>
    <ExecutablePath>$(CommonExecutablePath)</ExecutablePath>
    </PropertyGroup>

    to my vcxproj and it works. And would you add this by default in later updates? Not having PATH in custom steps is just surprising.

    wtywtykk
    Participant

    Hi,

    By clearing the VC++ Directories -> Executable Directories in regular VC projects, the problem can be reproduced.

    And the description for Executable Directories:

    Executable Directories
    Directories in which to search for executable files. Corresponds to the PATH environment variable.

    So I believe the problem is VisualGDB setting this property blank. Setting this to $(CommonExecutablePath) would solve the problem.

    in reply to: Problem with text color under Visual Studio 2019 #26241
    wtywtykk
    Participant

    Hi,
    It works, thank you!

    in reply to: Problem with text color under Visual Studio 2019 #26236
    wtywtykk
    Participant

    Hello,

    I encountered the color problem too. After installing the fix above, the colors were corrected. However, I can’t build the project now, and I got following messages:

    1>C:\Program Files (x86)\Sysprogs\VisualGDB\MSBuild\Targets\external.targets(6,3): error MSB4018: The “LaunchVisualGDB” task failed unexpectedly.
    1>C:\Program Files (x86)\Sysprogs\VisualGDB\MSBuild\Targets\external.targets(6,3): error MSB4018: System.TypeLoadException: Could not load type ‘VisualGDB.Builder.ISimpleFormattedBuildLogLineSink’ from assembly ‘VisualGDBCore, Version=5.5.1.1, Culture=neutral, PublicKeyToken=8f764369eb712693’.
    1>C:\Program Files (x86)\Sysprogs\VisualGDB\MSBuild\Targets\external.targets(6,3): error MSB4018: at Sysprogs.build.tasks.shared.LaunchVisualGDB.Execute()
    1>C:\Program Files (x86)\Sysprogs\VisualGDB\MSBuild\Targets\external.targets(6,3): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
    1>C:\Program Files (x86)\Sysprogs\VisualGDB\MSBuild\Targets\external.targets(6,3): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()

    And following messages show up when I open the project:

    error : Designtime build failed for project ‘C:\Users\163wt\Desktop\EmbeddedProject1\EmbeddedProject1\EmbeddedProject1.vcxproj’ configuration ‘Debug|VisualGDB’. IntelliSense might be unavailable.
    Set environment variable TRACEDESIGNTIME = true and restart Visual Studio to investigate.

    Regards

    in reply to: VisualGDB windows not working in VS2019 #25282
    wtywtykk
    Participant

    Hi,

    The workaround just works fine for me. My environment is: ARM toolchain 7.2.0/8.0.1/r3; STM32BSP 2019.06; OpenOCD 20190625-0.10.0

    in reply to: BIN file size ecxeeds flash size with no error #24312
    wtywtykk
    Participant

    Hi,

    Bad news. The new syntax has some new problem. The “_sidata” symbol points to a wrong address when the “Ignore standard libraries (-nostdlib)” option is turned on in the project properties. I do find an solution to this (using LOADADDR() ), but I’m not confident about it. I’ll test my modification with my previous projects and some special cases.

    However I suspect whether it’s worth taking the risk to change a stable code. May be the linker script should remain untouched.

Viewing 15 posts - 1 through 15 (of 20 total)