Skip to content

Commit

Permalink
README updates
Browse files Browse the repository at this point in the history
  • Loading branch information
SKyletoft committed Feb 13, 2022
1 parent a80586e commit b43aa19
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 5 deletions.
39 changes: 35 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,38 @@
MD407 Templates for use outside of CodeLite
# MD407 Templates for use outside of CodeLite

MOP templates support full debugging in VSC when connecting to SimServer. Also provides raw makefiles for vim users.
## VS Code users:

Datatekniskt Project template is a bit more basic, but has a decent layout to get started quicker. That makefile also supports MacOS.
Install the extension from the releases page, along with SimServer from gbgmv.se, the arm gcc toolchain and make. On Windows, this can be found on ARM's website (linked below), on Linux, it's available from your package manager. You also need to install the `Native Debug` extension by Web Freaks

To use: copy whatever folder you need, then open as folder in Visual Studio Code and follow the README.md file in that folder.
**Linux users need to add their user to the `dialout` group or equivalent and reboot (really reboot, for once logging out and in again is not enough)**

Once you have all the required programs, open VSC in an empty folder and hit `Ctrl + Shift + P` and type `Create new project from Basic template`.

You can now run the default program in SimServer by opening SimServer, then going to the debugging tab and hitting the green arrow.

You can also run the default program on Hardware by going to the MD407 Config tab (added by the extension), selecting the port under the ports section and then hitting `Interactive`, `Compile` and `Load` in order and then typing `go` in the now opened terminal. Remember to reset the MD407 between runs.

### Recommended extensions

* clangd by LLVM
* Clang-Format by xaver

### Required packages, as they're called on Debian (Ubuntu, Pop, Mint...)

* `gdb-multiarch`
* `make`
* `gcc-arm-none-eabi`
* `libnewlib-arm-none-eabi`
* `libnewlib-nano-arm-none-eabi`

## VIM / NeoVIM / CLion / Emacs / etc.

Copy the `Basic` folder into your project. Run `make build` to build your project. Do simserver debugging directly in gdb. TUI mode is recommended (`tui enable`), though it's only available on Linux. The `gdbinit` file is provided to automatically run the commands to connect to SimServer.

To communicate with the hardware, the `md407_win_rs` program is provided. Either download it from the releases page or compile it yourself and install with `cargo-install` like any other Rust program. On linux you either need to run it as root or add yourself to the `dialout` group.

## External Links

[SimServer](http://gbgmv.se/studies.html#machprog)

[GCC for Windows](https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads)
1 change: 0 additions & 1 deletion vsc_gui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@ This is an extension to integrate the Chalmers MD407 development board into Visu
## Known Issues

No Mac support

0 comments on commit b43aa19

Please sign in to comment.