From 3b7de598d34cdcca5bfe16312dda4c7eccf173f2 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Tue, 15 Dec 2015 00:50:14 +0200 Subject: [PATCH] Replace native with linux_arm platform for Raspberry Pi --- docs/frameworks/wiringpi.rst | 11 ++++ docs/platforms/creating_platform.rst | 4 ++ docs/platforms/linux_arm.rst | 59 ++++++++++++++++++- docs/platforms/native.rst | 45 +------------- .../raspberrypi/wiringpi-blink/platformio.ini | 2 +- .../wiringpi-serial/platformio.ini | 2 +- platformio/boards/raspberrypi.json | 6 +- 7 files changed, 79 insertions(+), 50 deletions(-) diff --git a/docs/frameworks/wiringpi.rst b/docs/frameworks/wiringpi.rst index 004a7ff2..ca3f414e 100644 --- a/docs/frameworks/wiringpi.rst +++ b/docs/frameworks/wiringpi.rst @@ -19,6 +19,17 @@ For more detailed information please visit `vendor site `_. .. contents:: +Platforms +--------- +.. list-table:: + :header-rows: 1 + + * - Name + - Description + + * - :ref:`platform_linux_arm` + - Linux ARM is a Unix-like and mostly POSIX-compliant computer operating system (OS) assembled under the model of free and open-source software development and distribution. Using host OS (Mac OS X, Linux ARM) you can build native application for Linux ARM platform. + Boards ------ diff --git a/docs/platforms/creating_platform.rst b/docs/platforms/creating_platform.rst index 3f5a29d2..598d7d56 100644 --- a/docs/platforms/creating_platform.rst +++ b/docs/platforms/creating_platform.rst @@ -86,6 +86,9 @@ Packages * - ``framework-spl`` - `Standard Peripheral Library for STM32 MCUs `_ + * - ``framework-wiringpi`` + - `GPIO Interface library for the Raspberry Pi `_ + * - ``ldscripts`` - `Linker Scripts `_ @@ -440,3 +443,4 @@ and copy there two files: Now, we should see ``ststm32gdb`` platform using :ref:`cmd_platforms_search` command output and can install it via :ref:`platformio platforms install ststm32gdb ` command. + diff --git a/docs/platforms/linux_arm.rst b/docs/platforms/linux_arm.rst index cc93db4b..80c89084 100644 --- a/docs/platforms/linux_arm.rst +++ b/docs/platforms/linux_arm.rst @@ -28,5 +28,62 @@ Packages * - Name - Contents + * - ``framework-wiringpi`` + - `GPIO Interface library for the Raspberry Pi `_ + * - ``toolchain-gccarmlinuxgnueabi`` - - `GCC for Linux ARM GNU EABI `_, `GDB `_ \ No newline at end of file + - `GCC for Linux ARM GNU EABI `_, `GDB `_ + +Frameworks +---------- +.. list-table:: + :header-rows: 1 + + * - Name + - Description + + * - :ref:`framework_wiringpi` + - WiringPi is a GPIO access library written in C for the BCM2835 used in the Raspberry Pi. It's designed to be familiar to people who have used the Arduino "wiring" system. + +Boards +------ + +.. note:: + * You can list pre-configured boards by :ref:`cmd_boards` command or + `PlatformIO Boards Explorer `_ + * For more detailed ``board`` information please scroll tables below by + horizontal. + +Raspberry Pi +~~~~~~~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``raspberrypi_1b`` + - `Raspberry Pi 1 Model B `_ + - BCM2835 + - 700 MHz + - 524288 Kb + - 524288 Kb + + * - ``raspberrypi_2b`` + - `Raspberry Pi 2 Model B `_ + - BCM2836 + - 900 MHz + - 1048576 Kb + - 1048576 Kb + + * - ``raspberrypi_zero`` + - `Raspberry Pi Zero `_ + - BCM2835 + - 1000 MHz + - 524288 Kb + - 524288 Kb diff --git a/docs/platforms/native.rst b/docs/platforms/native.rst index 8094d0bc..ba4864d0 100644 --- a/docs/platforms/native.rst +++ b/docs/platforms/native.rst @@ -17,47 +17,4 @@ Native development platform is intended to be used for desktop OS. This platform For more detailed information please visit `vendor site `_. -.. contents:: - -Boards ------- - -.. note:: - * You can list pre-configured boards by :ref:`cmd_boards` command or - `PlatformIO Boards Explorer `_ - * For more detailed ``board`` information please scroll tables below by - horizontal. - -Raspberry Pi -~~~~~~~~~~~~ - -.. list-table:: - :header-rows: 1 - - * - Type ``board`` - - Name - - Microcontroller - - Frequency - - Flash - - RAM - - * - ``raspberrypi_1b`` - - `Raspberry Pi 1 Model B `_ - - BCM2835 - - 700 MHz - - 524288 Kb - - 524288 Kb - - * - ``raspberrypi_2b`` - - `Raspberry Pi 2 Model B `_ - - BCM2836 - - 900 MHz - - 1048576 Kb - - 1048576 Kb - - * - ``raspberrypi_zero`` - - `Raspberry Pi Zero `_ - - BCM2835 - - 1000 MHz - - 524288 Kb - - 524288 Kb +.. contents:: \ No newline at end of file diff --git a/examples/raspberrypi/wiringpi-blink/platformio.ini b/examples/raspberrypi/wiringpi-blink/platformio.ini index e295bad2..201a6f35 100644 --- a/examples/raspberrypi/wiringpi-blink/platformio.ini +++ b/examples/raspberrypi/wiringpi-blink/platformio.ini @@ -18,6 +18,6 @@ # targets = upload [env:raspberrypi_2b] -platform = native +platform = linux_arm framework = wiringpi board = raspberrypi_2b diff --git a/examples/raspberrypi/wiringpi-serial/platformio.ini b/examples/raspberrypi/wiringpi-serial/platformio.ini index e295bad2..201a6f35 100644 --- a/examples/raspberrypi/wiringpi-serial/platformio.ini +++ b/examples/raspberrypi/wiringpi-serial/platformio.ini @@ -18,6 +18,6 @@ # targets = upload [env:raspberrypi_2b] -platform = native +platform = linux_arm framework = wiringpi board = raspberrypi_2b diff --git a/platformio/boards/raspberrypi.json b/platformio/boards/raspberrypi.json index 9499b8a0..ec4b7878 100644 --- a/platformio/boards/raspberrypi.json +++ b/platformio/boards/raspberrypi.json @@ -7,7 +7,7 @@ }, "frameworks": ["wiringpi"], "name": "Raspberry Pi 1 Model B", - "platform": "native", + "platform": "linux_arm", "upload": { "maximum_ram_size": 536870912, "maximum_size": 536870912 @@ -25,7 +25,7 @@ }, "frameworks": ["wiringpi"], "name": "Raspberry Pi 2 Model B", - "platform": "native", + "platform": "linux_arm", "upload": { "maximum_ram_size": 1073741824, "maximum_size": 1073741824 @@ -42,7 +42,7 @@ }, "frameworks": ["wiringpi"], "name": "Raspberry Pi Zero", - "platform": "native", + "platform": "linux_arm", "upload": { "maximum_ram_size": 536870912, "maximum_size": 536870912