Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/crimsonwoods/mirb-stm32f4discovery
mirb (an interpreter of mruby) port to STM32F4 Discovery board.
https://github.com/crimsonwoods/mirb-stm32f4discovery
Last synced: 2 months ago
JSON representation
mirb (an interpreter of mruby) port to STM32F4 Discovery board.
- Host: GitHub
- URL: https://github.com/crimsonwoods/mirb-stm32f4discovery
- Owner: crimsonwoods
- Created: 2013-04-03T14:50:07.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2013-04-03T15:33:30.000Z (almost 12 years ago)
- Last Synced: 2024-08-03T18:16:10.062Z (6 months ago)
- Language: C
- Size: 441 KB
- Stars: 4
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- AwesomeInterpreter - mirb-stm32f4discovery
README
mirb-stm32f4discovery
====This project is __experimental__ implementation.
What's 'mruby'
----
See this: https://github.com/mruby/mrubyWhat's 'STM32F4 Discovery'
----
Very low-cost ARM processor board.
See this: http://www.st.com/web/en/catalog/tools/PF252419Ready to build
----1. get Codesourcery toolchain for ARM processor.
2. setup your environment variable PATH to make 'arm-none-eabi-gcc' can run.
3. get 'mruby' source code from github.
4. build 'libmruby'.
5. get 'mirb-stm32f4discovery' source code.commands:
$ git clone https://github.com/mruby/mruby.git
$ cd mruby
$ vi build_config.rb
$ make
$ cd ..
$ git clone https://github.com/crimsonwoods/mirb-stm32f4discovery.gitEdit 'build_config.rb'
----
edit your 'build_config.rb' to build 'libmruby'.
append cross-build settings.
like this:MRuby::CrossBuild.new('stm32f407') do |conf|
toolchain :gcc
conf.bins = %w() # target is just only 'libmruby.a'.
conf.cc do |cc|
cc.command = 'arm-none-eabi-gcc'
cc.flags = %w(
-MD -Os
-mthumb -mcpu=cortex-m3 -nostdlib -mfloat-abi=softfp -mfpu=fpv4-sp-d16
-fsigned-char -fno-inline -ffunction-sections -mlittle-endian)
cc.defines = %w(
MRB_HEAP_PAGE_SIZE=256
POOL_PAGE_SIZE=1000
MRB_STR_BUF_MIN_SIZE=32
MRB_PARSER_BUF_SIZE=256)
end
conf.archiver do |ar|
ar.command = 'arm-none-eabi-ar'
end
endHow to build
----commands:
$ cd mirb-stm32f4discovery
$ make CROSS_COMPILE=arm-none-eabi-if build succeeded, you will get an executable binary file 'build/mirb.bin'.
How to run
----
Use STM32 ST-LINK Utility.Console Input/Output
----
"USART2" is assigned as standard input/output port.
On STM32F4 Discovery board, 'PA3' and 'PA2' is assigned as "USART2" (PA2=USART2_TX / PA3=USART2_RX).
You can connect level conversion board to that pins.License
----
MIT License