Giter Club home page Giter Club logo

vscode-maxim's Introduction

VSCode-Maxim

(If you're viewing this document from within Visual Studio Code you can press CTRL+SHIFT+V to open a Markdown preview window.)

Quick Links

Introduction

VSCode-Maxim is a set of Visual Studio Code project configurations and utilities for enabling embedded development for Analog Device's MSDK and the MAX32xxx/MAX78xxx microcontrollers.

The following features are supported:

  • Code editing with intellisense down to the register level
  • Code compilation with the ability to easily re-target a project for different microcontrollers and boards
  • Flashing programs
  • GUI and command-line debugging

Dependencies

Installation

Install the MSDK, then set "MAXIM_PATH" in your user VS Code settings.

See Getting Started with Visual Studio Code in the MSDK User Guide for detailed instructions.

Usage

See the MSDK User Guide for detailed usage info.

Issue Tracker

Bug reports, feature requests, and contributions are welcome via the issues tracker on Github.

New issues should contain at minimum the following information:

  • Visual Studio Code version #s (see Help -> About)
  • C/C++ Extension version #
  • Target microcontroller and evaluation platform
  • The projects .vscode folder and Makefile (where applicable). Standard compression formats such as .zip, .rar, .tar.gz, etc. are all acceptable.

vscode-maxim's People

Contributors

brianhindman avatar iono-adi avatar jake-carter avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vscode-maxim's Issues

MAX32670EVKIT RevB debugging odd behavior

image
image
VSCode-Maxim v1.3.0 release files.

When debugging the "hello_world" example the debug console produces the following report:

`openocd: Open On-Chip Debugger 0.11.0+dev-g4f85f7914 (2021-12-16-13:53)
openocd: Licensed under GNU GPL v2
openocd: For bug reports, read
openocd: http://openocd.org/doc/doxygen/bugs.html
openocd: DEPRECATED! use 'adapter driver' not 'interface'
openocd: DEPRECATED! use 'adapter srst delay' not 'adapter_nsrst_delay'
openocd: DEPRECATED! use 'adapter srst pulse_width' not 'adapter_nsrst_assert_width'
openocd: Info : CMSIS-DAP: SWD supported
openocd: Info : CMSIS-DAP: FW Version = 1.0
openocd: Info : CMSIS-DAP: Interface Initialised (SWD)
openocd: Info : SWCLK/TCK = 0 SWDIO/TMS = 0 TDI = 0 TDO = 0 nTRST = 0 nRESET = 0
openocd: Info : CMSIS-DAP: Interface ready
openocd: Info : clock speed 2000 kHz
openocd: Info : SWD DPIDR 0x2ba01477
openocd: Info : max32xxx.cpu: Cortex-M4 r0p1 processor detected
openocd: Info : max32xxx.cpu: target has 6 breakpoints, 4 watchpoints
openocd: Info : max32xxx.cpu: external reset detected
openocd: Info : starting gdb server for max32xxx.cpu on 3333
openocd: Info : Listening on port 3333 for gdb connections
openocd: Warn : Only resetting the Cortex-M core, use a reset-init event handler to reset any peripherals or configure hardware srst support.
openocd: target halted due to debug-request, current mode: Thread
openocd: xPSR: 0x01000000 pc: 0x000001b4 msp: 0x20004000
openocd: Info : Listening on port 6666 for tcl connections
openocd: Info : Listening on port 4444 for telnet connections
=thread-group-added,id="i1"
GNU gdb (GNU Tools for Arm Embedded Processors 9-2019-q4-major) 8.3.0.20190709-git
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "--host=i686-w64-mingw32 --target=arm-none-eabi".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word".
openocd: Info : accepting 'gdb' connection on tcp/3333
openocd: Warn : Prefer GDB command "target extended-remote :3333" instead of "target remote :3333"
openocd: Warn : Only resetting the Cortex-M core, use a reset-init event handler to reset any peripherals or configure hardware srst support.
openocd: target halted due to debug-request, current mode: Thread
openocd: xPSR: 0x01000000 pc: 0x000001b4 msp: 0x20004000
=cmd-param-changed,param="pagination",value="off"
openocd: Info : SWD DPIDR 0x2ba01477
openocd: Error: Failed to read memory at 0xfffff000
openocd: Info : SWD DPIDR 0x2ba01477
openocd: Error: Failed to read memory at 0xfffff000
openocd: Info : SWD DPIDR 0x2ba01477
openocd: Error: Failed to read memory at 0xfffff000
openocd: Info : SWD DPIDR 0x2ba01477
openocd: Error: Failed to read memory at 0xfffff000
Note: automatically using hardware breakpoints for read-only addresses.

Breakpoint 1, main () at main.c:62
62 printf("Hello World!\n");
Execute debugger commands using "-exec ", for example "-exec info registers" will list registers in use (when GDB is the debugger)`

The debug console looks stops at an unspecified breakpoint, but never gets to the first break point and continues the debugging with the second break point working as expected.
image
image

Similar behavior is observed on other examples of the MAX32670EVKIT, like the I2C example. However, in this example when I press the continue button, I get am Unknown break point exception.
image
image

The terminal output does not match the I2C example:
image

During compile I do not get any error messages and a I2C.elf is generated.

I checked the behavior of of the "Hello_World" example with the MAX32660EVSYS and did not see the same behavior. The test with the MAX32660 was done with the latest release files.

Flashing error to MAX32760 EvKit_V1

Following the steps in UG to setup VSCode-Maxim yields error free build, yet flashing results in "Remote communication error. Target disconnected.: No error."

Full terminal response:

  • Executing task: arm-none-eabi-gdb --cd="C:\Users\TKirkman\VSCODE_Workspace\TK_Project" --se="build/TK_Project.elf" --symbols=build/TK_Project.elf -x="C:\Users\TKirkman\VSCODE_Workspace\TK_Project/.vscode/flash.gdb" --ex="flash_m4 C:/MaximSDK/Tools/OpenOCD cmsis-dap.cfg MAX32670.cfg" --batch

C:\MaximSDK\Tools\GNUTools\10.3\bin\arm-none-eabi-gdb.exe: warning: Couldn't determine a path for
the index cache directory.
The target architecture is set to "armv7e-m".
Open On-Chip Debugger 0.11.0+dev-g2de3186d7 (2022-06-17-06:37)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Remote communication error. Target disconnected.: No error.

  • The terminal process "C:\WINDOWS\System32\cmd.exe /d /c arm-none-eabi-gdb --cd="C:\Users\TKirkman\VSCODE_Workspace\TK_Project" --se="build/TK_Project.elf" --symbols=build/TK_Project.elf -x="C:\Users\TKirkman\VSCODE_Workspace\TK_Project/.vscode/flash.gdb" --ex="flash_m4 C:/MaximSDK/Tools/OpenOCD cmsis-dap.cfg MAX32670.cfg" --batch" terminated with exit code: 1.
  • Terminal will be reused by tasks, press any key to close it.

/Library/Developer/CommandLineTools/usr/bin/make: unrecognized option `--output-sync=target'

** Visual Studio Code version**
-1 .85.1 (Universal)

** C/C++ Extension version**

  • v1.19.1

** Target microcontroller and evaluation platform**

  • [e.g. MAX32666]

Describe the bug

  • On MacOS with M1, M2 chips, make and gmake are both installed on the system it seems like. make only gets to version 3.81 currently and gmake goest to 4.4.1 and is designed for M1,M2 chips.
  • the '--output-sync=target' is only available after make version 4
  • I solved it by installing gmake and replacing the command 'make' on the tasks.json file for 'gmake'

To Reproduce
Steps to reproduce the behavior:

  1. Install the SDK on a M chip MacOS
  2. Setup SDK path
  3. tTy running any of the build tasks on VS Code's task.json file

Desktop (please complete the following information):

  • OS: MacOS
  • Version: 14.2.1
  • Processor: Apple M2

VSCode-Maxim-v130-windows.zip content

In the most recent version of the windows download. The readme instructions show the MaximSDK folder contains both Examples and Libraries. There is only examples.
VSCode-Maxim-v130-windows.zip\VSCode-Maxim-v130-windows\MaximSDK
image

The instructions also mentioned to copy and overwrite, but the examples only contain the .vscode folder on each of the examples, so it will practically erase the MaximSDK default code.

image

how to add asm file in makefile

** Visual Studio Code version**

  • 1.69.2

** C/C++ Extension version**
1.11.4

** Target microcontroller and evaluation platform**
MAX78000EVKIT

Describe the bug
how to add asm file(.s asm file) in gcc project (edit makefile ?)

Flashing Error with MAX78000 FTHR RevA not finding `interface/cmsis-dap.cfg`

Visual Studio Code version

  • 1.80.2

C/C++ Extension version

  • 1.16.3

Target microcontroller and evaluation platform

  • MAX78000 FTHR RevA

Describe the bug
When I copy the Hello_World example and try to flash it, it compiles just fine but fails to upload with the following error message.

 *  Executing task: arm-none-eabi-gdb --cd="C:\Users\Athri\Documents\Development\Embedded\MAX78000\template-cpp" --se="build/template-cpp.elf" --symbols=build/template-cpp.elf -x="C:\Users\Athri\Documents\Development\Embedded\MAX78000\template-cpp/.vscode/flash.gdb" --ex="flash_m4_run C:\MaximSDK/Tools/OpenOCD cmsis-dap.cfg max78000.cfg" --batch 

C:\MaximSDK\Tools\GNUTools\10.3\bin\arm-none-eabi-gdb.exe: warning: Couldn't determine a path for the index cache directory.
The target architecture is set to "armv7e-m".
Open On-Chip Debugger 0.11.0+dev-g56a818e4c (2023-06-28-22:13)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
Remote communication error.  Target disconnected.: No error.

The flash.log file contains the following:

embedded:startup.tcl:26: Error: Can't find interface/cmsis-dap.cfg
in procedure 'script' 
at file "embedded:startup.tcl", line 26

So it's some kind of issue with Windows 11 and the file path of the OpenOCD interface file.

What I've tried:

  • Reinstalling the MaximSDK
  • Changing all the paths in the .json files from / to \\ because Windows. ^^

To Reproduce
Steps to reproduce the behavior:

  1. Copy Hello_World folder
  2. Open with VSCode
  3. Hit Ctrl+Shift+B and select flash & run
  4. See error

Screenshots

  • If applicable, add screenshots to help explain your problem.

Desktop:

  • OS: Windows 11

VSCode + JLink-SWD Debugger Setting

Customer are using VS Code in their developing, JLink debugger will be used instead of PICO debugger, we have a setting procedure based on Eclipse + JLink for MSDK, yet the VS Code + JLink setting procedure is needed for project debugging and firmware downloading regarding OpenOCD has different interfaces with these IDEs and debuggers.

CMSIS Instructions Linker Issue

c:/maximsdk/tools/gnutools/10.3/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: undefined reference to __REV ,
__enable_irq and __disable_irq

Hi, I'm getting this linker error when compiling my code for MAX32520.
The error is an undefined reference to the intrinsic ARM functions for enabling/disabling interrupts, as well as the 'REV' function for reversing byte order.
These functions are part of the CMSIS library:
CMSIS\Include\core_cmFunc.h -> __enable_irq / __disable_irq
CMSIS\Include\core_cmInstr.h -> __REV

I can see that these files are being compiled in the system_max32520.d file.

I have tried changing the linker flags (LDFLAGS) in the Makefile according to this: https://stackoverflow.com/questions/19419782/exit-c-text0x18-undefined-reference-to-exit-when-using-arm-none-eabi-gcc
but it didn't fix the issue.
linker_issue

Would appreciate some help fixing this!

dyld[4469]: Library not loaded: /usr/local/opt/hidapi/lib/libhidapi.0.dylib

** Visual Studio Code version**

  • 1.85.1 (Universal)

** C/C++ Extension version**

  • 1.19.1

** Target microcontroller and evaluation platform**

  • [e.g. MAX32666]

Describe the bug

  • In macOS 14.2.1 hidapi is not installed on /usr/local/opt/hidapi/ but instead on /opt/homebrew/Cellar/hidapi
  • A symbolic link was able to solve the problem

To Reproduce
Steps to reproduce the behavior:

  1. Open a MaximSDK template for VS Code (or example folder)
  2. Setup target board
  3. run 'flash and run' task
  4. See error

Desktop (please complete the following information):

  • OS: macOS
  • Version 14.2.1
  • Chip M2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.