diff --git a/builder/main.py b/builder/main.py index 1835b78..b18517f 100644 --- a/builder/main.py +++ b/builder/main.py @@ -65,7 +65,7 @@ # -- Get a list of all the verilog files in the src folfer, in ASCII, with # -- the full path. All these files are used for the simulation -v_nodes = Glob(join(env['PROJECTSRC_DIR'], '*.v')) +v_nodes = Glob(join(env.subst('$PROJECT_SRC_DIR'), '*.v')) src_sim = [str(f) for f in v_nodes] # --- Get the Testbench file (there should be only 1) @@ -111,7 +111,7 @@ src_synth = [f for f in src_sim if f not in list_tb] # -- Get the PCF file -src_dir = env.subst('$PROJECTSRC_DIR') +src_dir = env.subst('$PROJECT_SRC_DIR') PCFs = join(src_dir, '*.pcf') PCF_list = Glob(PCFs) PCF = '' @@ -216,7 +216,7 @@ vcd_file = env.VCD(sout) target_sim = env.Alias('sim', vcd_file, 'gtkwave {0} {1}.gtkw'.format( - vcd_file[0], join(env['PROJECTSRC_DIR'], SIMULNAME))) + vcd_file[0], join(env.subst('$PROJECT_SRC_DIR'), SIMULNAME))) AlwaysBuild(target_sim) # diff --git a/examples/counter/README.md b/examples/counter/README.md new file mode 100755 index 0000000..ae32586 --- /dev/null +++ b/examples/counter/README.md @@ -0,0 +1,32 @@ +How to build PlatformIO based project +===================================== + +1. [Install PlatformIO Core](http://docs.platformio.org/page/core.html) +2. Download [development platform with examples](https://github.com/platformio/platform-lattice_ice40/archive/develop.zip) +3. Extract ZIP archive +4. Run these commands: + +```shell +# Change directory to example +$ cd platform-lattice_ice40/examples/counter + +# Build project +$ pio run + +# Verify project +$ pio run --target verify + +# Launch simulation +$ pio run --target sim + +# Launch time analysis +$ pio run --target time + +# Upload bitstream into the FPGA +$ pio run --target upload + +# Clean build files +$ pio run --target clean +``` + +NOTE: [GTKwave](http://gtkwave.sourceforge.net) is required for simulation diff --git a/examples/counter/README.rst b/examples/counter/README.rst deleted file mode 100755 index 6ef5ded..0000000 --- a/examples/counter/README.rst +++ /dev/null @@ -1,43 +0,0 @@ -.. Copyright 2014-present PlatformIO - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - -How to build PlatformIO based project -===================================== - -1. `Install PlatformIO Core `_ -2. Download `development platform with examples `_ -3. Extract ZIP archive -4. Run these commands: - -.. code-block:: bash - - # Change directory to example - > cd platform-lattice_ice40/examples/counter - - # Build project - > platformio run - - # Verify project - > platformio run --target verify - - # Launch simulation - > platformio run --target sim - - # Launch time analysis - > platformio run --target time - - # Upload bitstream into the FPGA - > platformio run --target upload - - # Clean build files - > platformio run --target clean - -NOTE: `GTKwave `_ is required for simulation diff --git a/examples/leds/README.md b/examples/leds/README.md new file mode 100755 index 0000000..49c0caf --- /dev/null +++ b/examples/leds/README.md @@ -0,0 +1,32 @@ +How to build PlatformIO based project +===================================== + +1. [Install PlatformIO Core](http://docs.platformio.org/page/core.html) +2. Download [development platform with examples](https://github.com/platformio/platform-lattice_ice40/archive/develop.zip) +3. Extract ZIP archive +4. Run these commands: + +```shell +# Change directory to example +$ cd platform-lattice_ice40/examples/leds + +# Build project +$ pio run + +# Verify project +$ pio run --target verify + +# Launch simulation +$ pio run --target sim + +# Launch time analysis +$ pio run --target time + +# Upload bitstream into the FPGA +$ pio run --target upload + +# Clean build files +$ pio run --target clean +``` + +NOTE: [GTKwave](http://gtkwave.sourceforge.net) is required for simulation diff --git a/examples/leds/README.rst b/examples/leds/README.rst deleted file mode 100755 index 70677ba..0000000 --- a/examples/leds/README.rst +++ /dev/null @@ -1,43 +0,0 @@ -.. Copyright 2014-present PlatformIO - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - -How to build PlatformIO based project -===================================== - -1. `Install PlatformIO Core `_ -2. Download `development platform with examples `_ -3. Extract ZIP archive -4. Run these commands: - -.. code-block:: bash - - # Change directory to example - > cd platform-lattice_ice40/examples/leds - - # Build project - > platformio run - - # Verify project - > platformio run --target verify - - # Launch simulation - > platformio run --target sim - - # Launch time analysis - > platformio run --target time - - # Upload bitstream into the FPGA - > platformio run --target upload - - # Clean build files - > platformio run --target clean - -NOTE: `GTKwave `_ is required for simulation diff --git a/platform.json b/platform.json index 0d6c207..91fb0ee 100644 --- a/platform.json +++ b/platform.json @@ -11,24 +11,22 @@ "FPGA" ], "engines": { - "platformio": "<5" + "platformio": "^5" }, "repository": { "type": "git", "url": "https://github.com/platformio/platform-lattice_ice40.git" }, - "version": "1.2.3", - "packageRepositories": [ - "https://dl.bintray.com/platformio/dl-packages/manifest.json", - "http://dl.platformio.org/packages/manifest.json" - ], + "version": "1.2.4", "packages": { "toolchain-icestorm": { "type": "toolchain", + "owner": "platformio", "version": "~1.10.0" }, "toolchain-iverilog": { "type": "toolchain", + "owner": "platformio", "version": "~1.1.0" } }