Cortex-ARM LearningCortex-ARM Learning is a VSCode Debugger extension intended to be used with ARM Assembly Language programs. The debugger is built off of the existing extension Cortex Debug. Cortex-ARM Learning is equipt with additional UI features that will aid early-stage programmers with the learning of Assembly Langugage and the concepts that are involved. FeaturesBuild ButtonBuild button can be found on the bottom left of the Status Bar of your VSCode Window.
Build Button FunctionalityBuilds your ARM Project. Any errors in your ARM code, found in your main.s file, will appear here. Once the project has built the project is ready to be debugged. Register ViewThe register window appears once you are debugging. It shows the values of all registers avaliable to ARM. Register View FunctionalityShows the values of the register in:
Performance CounterThe performance counter can be found in the left-side window along with the register view. It shows the current cost of the program,in main.s, in instruction cycles. Stack InterfaceThe stack interface window appears once you are debugging. Once initialised, the current Stack Pointer {SP} is shown at the top of the stack. Stack FunctionalityFollowing the live stack pointer, any values that are pushed onto or popped off of the stack, their memory values are shown. While the current stack pointer is pointed to.
Array InterfaceCtrl + Shift + P to open commands. Selecting Cortex-ARM Array command Enter the hexidecimal start address of the array. Example: Enter the element size of the elements of your array.
Example: Enter the dimensions of your array. Like a standard high-level language array where; array[i,j]. Enter your array ny number of rows followed by a comma, followed by the number of columns.
Example where array = [5,4] Enter how you would like the values of the array to be displayed. For decimal numbers, you can view in decimal. For a word, you can view in ascii.
Example: Result: Reference TableThis opens a text document that holds:
OtherThese features are all in addition to the already existing features of the debugger which include the following:
SetupVS CodeInstall this extension. Ctrl + Shift + P to open commands.
ARM Assembly Project FileUse CortexARM Project File when creating your project file to debug. Edit only the main.s file. EnvironmentTo setup your VSCode to be able to run Assembly Code through a board. Further documentation can be found at this tutorial. VSARM FolderCreate a folder in your C drive: 'C:', named VSARM to hold all downloads in the same directory. GNU ToolchainThis is our compiler to use to compile ARM Assembly Code. Download file indicated gcc-arm-none-eabi-9-2019-q4-major-win32.exe
Rename download foler, in C:\VSARM, to: armcc. Then you must add the following path:
to your PATH variable located in the System Variables in your system's Enviornment Variables. To see how to do this follow the tutorial.
STLink to JLinkSTLink and JLink are links used to communicate between your board and your computer. If your board is configured with STLink, change it to JLink. Flash board to be used with JLink rather than STLink using STLink Reflash. Using option (1)Upgrade to JLink. JLinkDownload J-Link Software and Documentation Pack
Board
If have a different version of the board, find .svd file and add to .ignore file and in vscode folder, change launch file for project, according to your board. ContributingPull requests are welcome. AcknowledgmentsThis extension is built upon Marcus's (marcus25) Cortex Debug extension (https://marketplace.visualstudio.com/items?itemName=marus25.cortex-debug). His project provided an excellent debugger. |