FMUSER Wirless Transmit Video And Audio More Easier !

[email protected] WhatsApp +8618078869184
Language

    Use VS Code debugging RT-Thread QEMU-VEXPRESS-A9 BSP project

     

    This application note describes the use of VS Code debugging RT-THREAD QEMU-VEXPRESS-A9 BSP project in the Windows platform. The purpose and structure of this article The purpose and background of this article VS C ++ ODE (full name Visual Studio Code is a lightweight code editor, supporting Windows, OS X, and Linux. Support for built-in JavaScript, TypeScript, and Node.js, and has a wealth of plug-in ecosystems that support C ++, C #, Python, PHP, etc. other languages ​​by installing plugins. This article mainly introduces the use of VS Code debug qemu-vexpress-a9 BSP projects in the Windows platform. This article This article mainly introduces VS Code debugging preparations and how to debug projects. Ready to work Download the RT-THREAD source code, recommend download 3.1.0 and above. Download the RT-THREAD ENV tool, recommend version 1.0.0 and above. Https://www.rt-thread.org/document/site/rtthread-development-guide/rtthread-tool-manual/env/env-user-manual/ Download VS Code Https://code.visualstudio.com/downloadload Please copy it to your browser before Run and debug RT-THREAD Step one installation and debug plugin Download and install debugging plugins supporting C / C ++ in vs code extensions: After installing, confirm that the plugin is the following state, if not, click to reload: Step Second to open the VS Code project project Enter the QEMU-VEXPRESS-A9 BSP root directory in the ENV console, then enter the command code. Open the VS CODE. The QEMU-VEXPRESS-A9 BSP folder is automatically opened after the VS Code is turned on, as shown below. Step three compilation RT-THREAD Click VS Code "View -> Term" to open the VS Code internal terminal, enter the command SCONS in the terminal to compile the project, and the terminal prints the compilation information. After the compilation is completed, you can run the project. The terminal will output the RT-Thread launch LOGO information, and the QEMU has run. Precautions: 1. Need to compile the project to generate the RTTHREAD.ELF file before debugging the BSP project. 2, you can use the Scons - Target = vsc -s command to update the C / C ++ header file search path information for VS CODE. It is not necessary to update every time, only RT-THREAD is reconfigured by menusfig or change the RTConfig.h header file. Step 4 Modify QEMU-DBG.BAT files Before start debugging, you need to edit the QEMU-DBG.bat file under the directory of QEMU-VEXPRESS-A9, add Start before QEMU-System-ARM: @echo offif exist sd.bin goto run qemu-img create -f raw sd.bin 64m: Run Start QEMU-SYSTEM-ARM -M VEXPRESS-A9-Kenergy RTTHREAD.ELF -SERIAL STDIO -SD SD.BIN -S -S Step five debugging projects As shown in the figure below, click the Trial Menu (Parquel icon) in VS Code, the debug platform selects Windows, then press F5 to turn on the QEMU debug mode, and the breakpoint stays in the main function. The VS Code debug options are shown below: Qemu has also running, as shown in the following figure. You can use the GDB command in VS Code, you need to add -EXEC in front. For example, the -exec info registers command can view the contents of the register: Some of the other major orders are as follows: View memory address content: X /, each parameter description as follows: n is a positive integer that represents the number of memory cells that need to be displayed, that is, the content of a memory cell is displayed from the current address, and the size of the memory unit is defined by the following U f represents the format shown, see below. If the address refers to a string, the format can be s. Other formats are shown in the following table: u Represents the number of bytes requested from the current address, if not specified, the GDB defaults to 4 Bytes. u Parameters can be replaced by the following characters, b represents the single-byte, h represents the double byte, w represents the four-byte, g represents eight bytes. When we specify the length of the byte length, the GDB will start from the memory address, read and write the specified byte, and take it as a value. Addr represents a memory address. Note: Strictly distinguish between N and u, n represents the number of units, u represents the size of each unit. Example: X / 3uh 0x54320 represents reading content from the memory address 0x54320, H represents a double-byte as a unit, 3 indicates the output three units, u means that pressing hexadecimal display. View the contents of the current program: X / 10X $ SP -. 1882. Print the top 10 elements of the Stack View the current quarter information: Info frame ---- List general Info About the frame View the parameters of the current program: Info Args --- Lists Arguments to the function View the local variable of the current program: Info locals --- List variables Stored in The Frame View the value of the current register: Info Registers Info All-Registers (including Floating point register) View an exception processor in the current stack frame: Info Catch (Exception Handlers) Tips: You can only enter the first letter of each command when you enter a command. For example: Info Registers can only enter I R. Precautions If you add an additional folder in the VS Code directory, it will cause debugging that cannot be started. Every time you start debugging, you need to use the ENV tool to use the code in the BSP root directory. Command Open VS CODE to debug the project. refer to ENV Tool User Manual common problem For questions related to the ENV tool, please refer to the Common Data Link Section of the ENV Tool User Manual. Can't find 'QEMU-System-Arm'. Workaround: Direct Open the VS Code debugging project will have this error. Use the ENV tool to use the code in the BSP root directory. Command Open vs code. The VS Code debug option does not appear the debug @ windows option. Workaround: Please update the RT-THREAD source code to 3.1.0 and above. , Read full text, original text title: [RTOS column] Using VS Code + QEMU debug rt-thread Article Source: [Micro Signal: ElecFans, WeChat public number: Electronic enthusiast network] Welcome to add attention! Please indicate the source of the article.

     

     

     

     

    List all Question

    Nickname

    Email

    Questions

    Our other product:

    Professional FM Radio Station Equipment Package

     



     

    Hotel IPTV Solution

     


      Enter email  to get a surprise

      fmuser.org

      es.fmuser.org
      it.fmuser.org
      fr.fmuser.org
      de.fmuser.org
      af.fmuser.org ->Afrikaans
      sq.fmuser.org ->Albanian
      ar.fmuser.org ->Arabic
      hy.fmuser.org ->Armenian
      az.fmuser.org ->Azerbaijani
      eu.fmuser.org ->Basque
      be.fmuser.org ->Belarusian
      bg.fmuser.org ->Bulgarian
      ca.fmuser.org ->Catalan
      zh-CN.fmuser.org ->Chinese (Simplified)
      zh-TW.fmuser.org ->Chinese (Traditional)
      hr.fmuser.org ->Croatian
      cs.fmuser.org ->Czech
      da.fmuser.org ->Danish
      nl.fmuser.org ->Dutch
      et.fmuser.org ->Estonian
      tl.fmuser.org ->Filipino
      fi.fmuser.org ->Finnish
      fr.fmuser.org ->French
      gl.fmuser.org ->Galician
      ka.fmuser.org ->Georgian
      de.fmuser.org ->German
      el.fmuser.org ->Greek
      ht.fmuser.org ->Haitian Creole
      iw.fmuser.org ->Hebrew
      hi.fmuser.org ->Hindi
      hu.fmuser.org ->Hungarian
      is.fmuser.org ->Icelandic
      id.fmuser.org ->Indonesian
      ga.fmuser.org ->Irish
      it.fmuser.org ->Italian
      ja.fmuser.org ->Japanese
      ko.fmuser.org ->Korean
      lv.fmuser.org ->Latvian
      lt.fmuser.org ->Lithuanian
      mk.fmuser.org ->Macedonian
      ms.fmuser.org ->Malay
      mt.fmuser.org ->Maltese
      no.fmuser.org ->Norwegian
      fa.fmuser.org ->Persian
      pl.fmuser.org ->Polish
      pt.fmuser.org ->Portuguese
      ro.fmuser.org ->Romanian
      ru.fmuser.org ->Russian
      sr.fmuser.org ->Serbian
      sk.fmuser.org ->Slovak
      sl.fmuser.org ->Slovenian
      es.fmuser.org ->Spanish
      sw.fmuser.org ->Swahili
      sv.fmuser.org ->Swedish
      th.fmuser.org ->Thai
      tr.fmuser.org ->Turkish
      uk.fmuser.org ->Ukrainian
      ur.fmuser.org ->Urdu
      vi.fmuser.org ->Vietnamese
      cy.fmuser.org ->Welsh
      yi.fmuser.org ->Yiddish

       
  •  

    FMUSER Wirless Transmit Video And Audio More Easier !

  • Contact

    Address:
    No.305 Room HuiLan Building No.273 Huanpu Road Guangzhou China 510620

    E-mail:
    [email protected]

    Tel / WhatApps:
    +8618078869184

  • Categories

  • Newsletter

    FIRST OR FULL NAME

    E-mail

  • paypal solution  Western UnionBank OF China
    E-mail:[email protected]   WhatsApp:+8618078869184   Skype:sky198710021 Chat with me
    Copyright 2006-2020 Powered By www.fmuser.org

    Contact Us