Quick start: Difference between revisions

From Miosix Wiki
Jump to navigation Jump to search
(Created page with "== Quick start guide == To start using Miosix you need a patched version of the GCC compiler to support the Miosix thread model and git to download the kernel sources. Option...")
 
(Better instructions for configuring VSCode.)
 
(17 intermediate revisions by 7 users not shown)
Line 1: Line 1:
== Quick start guide ==
To start using Miosix you need a patched version of the GCC compiler called [[Miosix Toolchain]] and git to download the kernel sources. Optionally you can also use an IDE to simplify code development, and an in-circuit debugger to speed up bug fixing.


To start using Miosix you need a patched version of the GCC compiler to support the Miosix thread model and git to download the kernel sources. Optionally you can also use an IDE to simplify code development, and an in-circuit debugger to speed up bug fixing.
= Getting started =


''' Changes with respect to Miosix 1.x '''
This section will guide you through the installation of the minimum requirements to start using Miosix: installing the compiler, and downloading the kernel.


A word of warning if you are a long-time user of Miosix: please note that in Miosix 2.0 there were significant changes.
* [[Linux Quick Start|Getting Started on Linux]]
First of all, Miosix 2.0 uses GCC 4.7.3 and is no longer compatible with the old GCC 4.5.2 used in Miosix 1.x, so you need to upgrade your compiler.
* [[Windows Quick Start|Getting Started on Windows]]
Second, the preferred way to install the compiler is through a precompiled installer available for both Linux and Windows. If you want, though, you can still build the compiler from sources.
* [[MacOS Quick Start|Getting Started on macOS]]
Last, keep in mind that the compiler patches are still a work in progress. When doing a 'git pull' you may need to upgrade the compiler too.


=== Getting started ===
= Miosix and git workflow =


* [[LinuxQuickStart|Getting Started on Linux]]
See [[Miosix and git workflow]] to understand how to manage the Miosix git repository.
* [[WindowsQuickStart|Getting Started on Windows]]
 
= In-circuit debugger =
 
An in-circuit debugger allows to physically halt the CPU inside a microcontroller, single-step it and view all the variables at any given time. It is a powerful tool to debug software running on a microcontroller. Miosix uses GDB and [http://openocd.sourceforge.net openocd] for in-circuit debugging.
 
* [[Linux Debugger configuration]]
* [[Windows Debugger configuration]]
 
= IDEs =
 
At the moment the simplest way to develop Miosix is to use a plain text editor. Alternatively, you can use any IDE that supports Makefiles to take advantage of features such as autocompletion and/or debugger integration (where available).
 
== Visual Studio Code ==
 
Visual Studio Code is known to work properly on the Miosix source tree with the standard C/C++ and Makefile extensions. After installing these extensions, you need to configure IntelliSense in the C/C++ extension to use the include paths found from the Makefile by setting the ''Configuration provider'' for the workspace to <code>ms-vscode.makefile-tools</code>.
 
Integration with GDB/openocd has not been tested but you can run GDB/openocd manually in the integrated terminal.
 
== Netbeans IDE ==
 
'''Important:''' These instructions were developed back when NetBeans was still a Sun product, they are probably outdated by now!
 
For a long time the default IDE to develop for Miosix has been [https://netbeans.org/ Netbeans]. NetBeans does not come with Miosix support out of the box, so you have to configure it first.
 
* [[Linux Netbeans configuration]]
* [[Windows Netbeans configuration]]
* [[OSX Netbeans configuration]]
 
== Other IDEs ==
 
* [[VisualStudio Quick Start|Windows Visual Studio configuration]] using VisualGDB which integrates in-circuit debugging support.
* [[Linux Eclipse configuration|Eclipse]], which has the added feature to allow in-circuit debugging directly from the IDE.
* [[Linux QtCreator configuration]]
* [[Windows QtCreator configuration]]
 
[[Category:Installation and Configuration]]

Latest revision as of 17:30, 17 March 2024

To start using Miosix you need a patched version of the GCC compiler called Miosix Toolchain and git to download the kernel sources. Optionally you can also use an IDE to simplify code development, and an in-circuit debugger to speed up bug fixing.

Getting started

This section will guide you through the installation of the minimum requirements to start using Miosix: installing the compiler, and downloading the kernel.

Miosix and git workflow

See Miosix and git workflow to understand how to manage the Miosix git repository.

In-circuit debugger

An in-circuit debugger allows to physically halt the CPU inside a microcontroller, single-step it and view all the variables at any given time. It is a powerful tool to debug software running on a microcontroller. Miosix uses GDB and openocd for in-circuit debugging.

IDEs

At the moment the simplest way to develop Miosix is to use a plain text editor. Alternatively, you can use any IDE that supports Makefiles to take advantage of features such as autocompletion and/or debugger integration (where available).

Visual Studio Code

Visual Studio Code is known to work properly on the Miosix source tree with the standard C/C++ and Makefile extensions. After installing these extensions, you need to configure IntelliSense in the C/C++ extension to use the include paths found from the Makefile by setting the Configuration provider for the workspace to ms-vscode.makefile-tools.

Integration with GDB/openocd has not been tested but you can run GDB/openocd manually in the integrated terminal.

Netbeans IDE

Important: These instructions were developed back when NetBeans was still a Sun product, they are probably outdated by now!

For a long time the default IDE to develop for Miosix has been Netbeans. NetBeans does not come with Miosix support out of the box, so you have to configure it first.

Other IDEs