SlideShare a Scribd company logo
Real practice of Networking
design on specialized
for
ARM Cortex-M
Ben Wei (a.k.a ben6)
2013/08/03
Right’s to copy
Attribution – ShareAlike 3.0
You are free
•  to copy, distribute, display, and perform the work
•  to make derivative works
•  to make commercial use of the work
Under the following conditions
•  For any reuse or distribution, you must make clear to others the license terms of this work.
•  Any of these conditions can be waived if you get permission from the copyright holder.
Your fair use and other rights are in no way affected by the above.
Attribution. You must give the original author credit.
Share Alike. If you alter, transform, or build upon this work, you may distribute the
resulting work only under a license identical to this one.
© Copyright 2013 juluos
http://juluos.org
License text: http://creativecommons.org/licenses/by-sa/3.0/legalcode
Who am I?
•  Current
o  JuluOSDev, StarOS Lab
•  Bio
Love to try new technologies and
enjoy researching topics in networking
and operation system domains
http://about.me/ben6
Agenda
• Why real practice topic?
• Hardware Overview
• Development experience sharing
Why? Connect Internet of Things
Internet
of Things
thingsquare
thingsquare
thingsquare
thingsquare
Thingsqure Tech Overview
Thingsqure
of Services
Things
Contiki-OS Router
Connect Apps with things
Connecting thermostats, light
bulbs, street lights, and more
Real Practice
Prototype
Cortex-M Hardware with Ethernet adapter
enc28J60STM32F407VGT6
USB-Serial Controller
Prolific 2303
STM32F407VGT6
•  32-bit ARM® Cortex™-M4-based
STM32-F4
•  168MHz, upto 210 MIPS
•  1MB Flash, 192KB RAM
ST-LINK
USB for
Input
USB 2.0
OTG
Architecture diagram
Network Adapter
Driver
TCPIP Stack (UIP, lwIP, SDP …)
Application 1 Application 2 Application n
Firmware
Hardware
ARM Board
Ethernet Adapter
Adapter Survery
SPI Ethernet Adapter
SPI Interface
SPI
Master
SCLK
MOSI
MISO
CS
SPI
Slave
SCLK
MOSI
MISO
CS
Serial Peripheral Interface Bus,SPI
What’s SPI? (Input)
MSB (I) LSB (I)
Open
What’s SPI? (Output)
MSB LSB
ignore
Driver – enc28j60
Base on SPI Command with OP Code
SPI Commands:
RCR, RBM, WCR, WBM, BFS, BFC, SC
Op Code argument data
Byte 0 Byte 1
enc28j60 Ethernet adapter
SPI pinout
PA5 = SCK
PA6 = MISO
PA7 = MOSI
PE7 = CS
ENC28J60 Pinouts
Buffer
Development
Experience Sharing
F4OS
F4OS
git://github.com/benwei/F4OS.git
-- Fork from prattmic/F4OS
F4OS
Architecture diagram
Network Adapter
En28j60 Driver
TCPIP Stack (SDP)
Shell
F4OS
Hardware
ARM Board
Simple Server
Toolchain
launchpad.net/gcc-arm-
embedded/+download
Debugging
•  USB Serial Controller
•  STM32 STlink
USB Serial Console Mac OS X as example
1
Screen is your good friend
sudo screen /dev/tty.usbserial 115200
2
st-util wait gdb
ben@xubuntu:~/src/github/stlink$ ./st-util
2012-06-10T22:56:32 INFO src/stlink-usb.c: -- exit_dfu_mode
2012-06-10T22:56:32 INFO src/stlink-common.c: Loading device parameters....
2012-06-10T22:56:32 INFO src/stlink-common.c: Device connected is: F4
device, id 0x20006411
2012-06-10T22:56:32 INFO src/stlink-common.c: SRAM size: 0x30000 bytes
(192 KiB), Flash: 0x100000 bytes (1024 KiB) in pages of 16384 bytes
Chip ID is 00000413, Core ID is 2ba01477.
KARL - should read back as 0x03, not 60 02 00 00
init watchpoints
Listening at *:4242...
Listening at *:4242
./st-util
gdb with st-util
~/F4OS$ arm-none-eabi-gdb
GNU gdb (Sourcery CodeBench Lite 2012.03-56) 7.2.50.20100908-cvs
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=i686-pc-linux-gnu --target=arm-none-
eabi".
For bug reporting instructions, please see:
<https://support.codesourcery.com/GNUToolchain/>.
(gdb) target remote :4242
Remote debugging using :4242
0x007f3ff4 in ?? ()
target remote :4242
How to build F4OS?
$ git://github.com/benwei/F4OS.git
$ cd F4OS_prototype
$ make clean
$ make
$ make burn
GCC_ARM_PATH="/opt/gcc-arm-none-eabi-4_7-2013q1/bin"
STLINK_PATH="$SH_PATH/stlink”
export PATH="$PATH:$GCC_ARM_PATH:$STLINK_PATH"
1
2
Write bin file to F4
$ make burn
st-flash write ./out/f4os.bin 0x8000000
2013-08-01T13:28:57 INFO src/stlink-common.c: Loading device parameters....
2013-08-01T13:28:57 INFO src/stlink-common.c: Device connected is: F4 device, id 0x20006411
2013-08-01T13:28:57 INFO src/stlink-common.c: SRAM size: 0x30000 bytes (192 KiB), Flash:
0x100000 bytes (1024 KiB) in pages of 16384 bytes
2013-08-01T13:28:57 INFO src/stlink-common.c: Attempting to write 30540 (0x774c) bytes to stm32
address: 134217728 (0x8000000)
EraseFlash - Sector:0x0 Size:0x4000
Flash page at addr: 0x08000000 erasedEraseFlash - Sector:0x1 Size:0x4000
Flash page at addr: 0x08004000 erased
2013-08-01T13:28:57 INFO src/stlink-common.c: Finished erasing 2 pages of 16384 (0x4000) bytes
2013-08-01T13:28:57 INFO src/stlink-common.c: Starting Flash write for F2/F4
2013-08-01T13:28:57 INFO src/stlink-common.c: Successfully loaded flash loader in sram
size: 30540
2013-08-01T13:28:58 INFO src/stlink-common.c: Starting verification of write complete
2013-08-01T13:28:58 INFO src/stlink-common.c: Flash written and verified! jolly good!
st-flash write ./out/f4os.bin 0x8000000
Demo
Environment Demo
Summary
•  Why Stm32 Networking?
•  Hardware Prototype:
o  STM32F4 Discovery + ENC28J60 + PL2303
•  Experience Sharing & Development tips
o  How to build, burn, debug tools
?
Q & A
compile stlink in ubuntu
sudo apt-get install autoconf libusb-1.0.0
sh autogen.sh
./configure
make
Tips: please don't install, just use export PATH=~/stlink/:$PATH
For easier update
STM32F407VGT6
•  microcontroller featuring 32-bit ARM Cortex-M4F core, 1 MB Flash, 192
KB RAM in an LQFP100 package
•  On-board ST-LINK/V2 with selection mode switch to use the kit as a
standalone ST- LINK/V2 (with SWD connector for programming and
debugging)
•  LIS302DL, ST MEMS motion sensor, 3-axis
•  digital output accelerometer
•  MP45DT02, ST MEMS audio sensor, omni- directional digital microphone
•  CS43L22, audio DAC with integrated class D speaker driver
•  Eight LEDs:
•  USB OTG FS with micro-AB connector
•  Extension header for all LQFP100 I/Os for quick connection to prototyping
board and easy probing
More - reference DM00037955.pdf
References
•  ENC28J60 programming guide
•  http://thingsquare.com/tech/
•  http://www.contiki-os.org/
•  STM32F4DISCOVERYDiscovery kit
CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h
STM32F4 Working MHz (F4OS)
#define PLL_M 25
#define PLL_M 8
-DHSE_VALUE=8000000
boot/boot_main.c
1
2

More Related Content

Similar to Real practice of Networking design on specialized for ARM Cortex-M

LCU14 114- Upstreaming 201
LCU14 114- Upstreaming 201LCU14 114- Upstreaming 201
LCU14 114- Upstreaming 201
Linaro
 
A Journey to Boot Linux on Raspberry Pi
A Journey to Boot Linux on Raspberry PiA Journey to Boot Linux on Raspberry Pi
A Journey to Boot Linux on Raspberry Pi
Jian-Hong Pan
 
44 con slides
44 con slides44 con slides
44 con slides
geeksec80
 
44 con slides (1)
44 con slides (1)44 con slides (1)
44 con slides (1)
geeksec80
 
Hardwear.io 2018 BLE Security Essentials workshop
Hardwear.io 2018 BLE Security Essentials workshopHardwear.io 2018 BLE Security Essentials workshop
Hardwear.io 2018 BLE Security Essentials workshop
Slawomir Jasek
 
How to Speak Intel DPDK KNI for Web Services.
How to Speak Intel DPDK KNI for Web Services.How to Speak Intel DPDK KNI for Web Services.
How to Speak Intel DPDK KNI for Web Services.
Naoto MATSUMOTO
 
Final ProjectFinal Project Details Description Given a spec.docx
Final ProjectFinal Project Details Description  Given a spec.docxFinal ProjectFinal Project Details Description  Given a spec.docx
Final ProjectFinal Project Details Description Given a spec.docx
AKHIL969626
 
Altiums Amazing Features - Project Management Tools - Welcome to OXELTECH.pdf
Altiums Amazing Features - Project Management Tools - Welcome to OXELTECH.pdfAltiums Amazing Features - Project Management Tools - Welcome to OXELTECH.pdf
Altiums Amazing Features - Project Management Tools - Welcome to OXELTECH.pdf
aud Scarlet
 
Deploy STM32 family on Zephyr - SFO17-102
Deploy STM32 family on Zephyr - SFO17-102Deploy STM32 family on Zephyr - SFO17-102
Deploy STM32 family on Zephyr - SFO17-102
Linaro
 
Lustre File System on ARM
Lustre File System on ARMLustre File System on ARM
Lustre File System on ARM
inside-BigData.com
 
A million ways to provision embedded linux devices
A million ways to provision embedded linux devicesA million ways to provision embedded linux devices
A million ways to provision embedded linux devices
Mender.io
 
06 - ELF format, knowing your friend
06 - ELF format, knowing your friend06 - ELF format, knowing your friend
06 - ELF format, knowing your friend
Alexandre Moneger
 
BeagleBone Black Bootloaders
BeagleBone Black BootloadersBeagleBone Black Bootloaders
BeagleBone Black Bootloaders
SysPlay eLearning Academy for You
 
LCA14: LCA14-112: Upstreaming 201
LCA14: LCA14-112: Upstreaming 201LCA14: LCA14-112: Upstreaming 201
LCA14: LCA14-112: Upstreaming 201
Linaro
 
Itech 1005
Itech 1005Itech 1005
Itech 1005
Christina Ramirez
 
Kauli SSPにおけるVyOSの導入事例
Kauli SSPにおけるVyOSの導入事例Kauli SSPにおけるVyOSの導入事例
Kauli SSPにおけるVyOSの導入事例
Kazuhito Ohkawa
 
Extending the life of your device (firmware updates over LoRa) - LoRa AMM
Extending the life of your device (firmware updates over LoRa) - LoRa AMMExtending the life of your device (firmware updates over LoRa) - LoRa AMM
Extending the life of your device (firmware updates over LoRa) - LoRa AMM
Jan Jongboom
 
Moksha - HTML5/CSS with Qt5+Snowshoe on AM335x
Moksha - HTML5/CSS with Qt5+Snowshoe on AM335xMoksha - HTML5/CSS with Qt5+Snowshoe on AM335x
Moksha - HTML5/CSS with Qt5+Snowshoe on AM335x
Prabindh Sundareson
 
44CON 2013 - Browser bug hunting - Memoirs of a last man standing - Atte Kett...
44CON 2013 - Browser bug hunting - Memoirs of a last man standing - Atte Kett...44CON 2013 - Browser bug hunting - Memoirs of a last man standing - Atte Kett...
44CON 2013 - Browser bug hunting - Memoirs of a last man standing - Atte Kett...
44CON
 
Difference between soc and single board computer ppt1
Difference between soc and single board computer ppt1Difference between soc and single board computer ppt1
Difference between soc and single board computer ppt1
Edgefxkits & Solutions
 

Similar to Real practice of Networking design on specialized for ARM Cortex-M (20)

LCU14 114- Upstreaming 201
LCU14 114- Upstreaming 201LCU14 114- Upstreaming 201
LCU14 114- Upstreaming 201
 
A Journey to Boot Linux on Raspberry Pi
A Journey to Boot Linux on Raspberry PiA Journey to Boot Linux on Raspberry Pi
A Journey to Boot Linux on Raspberry Pi
 
44 con slides
44 con slides44 con slides
44 con slides
 
44 con slides (1)
44 con slides (1)44 con slides (1)
44 con slides (1)
 
Hardwear.io 2018 BLE Security Essentials workshop
Hardwear.io 2018 BLE Security Essentials workshopHardwear.io 2018 BLE Security Essentials workshop
Hardwear.io 2018 BLE Security Essentials workshop
 
How to Speak Intel DPDK KNI for Web Services.
How to Speak Intel DPDK KNI for Web Services.How to Speak Intel DPDK KNI for Web Services.
How to Speak Intel DPDK KNI for Web Services.
 
Final ProjectFinal Project Details Description Given a spec.docx
Final ProjectFinal Project Details Description  Given a spec.docxFinal ProjectFinal Project Details Description  Given a spec.docx
Final ProjectFinal Project Details Description Given a spec.docx
 
Altiums Amazing Features - Project Management Tools - Welcome to OXELTECH.pdf
Altiums Amazing Features - Project Management Tools - Welcome to OXELTECH.pdfAltiums Amazing Features - Project Management Tools - Welcome to OXELTECH.pdf
Altiums Amazing Features - Project Management Tools - Welcome to OXELTECH.pdf
 
Deploy STM32 family on Zephyr - SFO17-102
Deploy STM32 family on Zephyr - SFO17-102Deploy STM32 family on Zephyr - SFO17-102
Deploy STM32 family on Zephyr - SFO17-102
 
Lustre File System on ARM
Lustre File System on ARMLustre File System on ARM
Lustre File System on ARM
 
A million ways to provision embedded linux devices
A million ways to provision embedded linux devicesA million ways to provision embedded linux devices
A million ways to provision embedded linux devices
 
06 - ELF format, knowing your friend
06 - ELF format, knowing your friend06 - ELF format, knowing your friend
06 - ELF format, knowing your friend
 
BeagleBone Black Bootloaders
BeagleBone Black BootloadersBeagleBone Black Bootloaders
BeagleBone Black Bootloaders
 
LCA14: LCA14-112: Upstreaming 201
LCA14: LCA14-112: Upstreaming 201LCA14: LCA14-112: Upstreaming 201
LCA14: LCA14-112: Upstreaming 201
 
Itech 1005
Itech 1005Itech 1005
Itech 1005
 
Kauli SSPにおけるVyOSの導入事例
Kauli SSPにおけるVyOSの導入事例Kauli SSPにおけるVyOSの導入事例
Kauli SSPにおけるVyOSの導入事例
 
Extending the life of your device (firmware updates over LoRa) - LoRa AMM
Extending the life of your device (firmware updates over LoRa) - LoRa AMMExtending the life of your device (firmware updates over LoRa) - LoRa AMM
Extending the life of your device (firmware updates over LoRa) - LoRa AMM
 
Moksha - HTML5/CSS with Qt5+Snowshoe on AM335x
Moksha - HTML5/CSS with Qt5+Snowshoe on AM335xMoksha - HTML5/CSS with Qt5+Snowshoe on AM335x
Moksha - HTML5/CSS with Qt5+Snowshoe on AM335x
 
44CON 2013 - Browser bug hunting - Memoirs of a last man standing - Atte Kett...
44CON 2013 - Browser bug hunting - Memoirs of a last man standing - Atte Kett...44CON 2013 - Browser bug hunting - Memoirs of a last man standing - Atte Kett...
44CON 2013 - Browser bug hunting - Memoirs of a last man standing - Atte Kett...
 
Difference between soc and single board computer ppt1
Difference between soc and single board computer ppt1Difference between soc and single board computer ppt1
Difference between soc and single board computer ppt1
 

More from Benux Wei

F9 microkernel app development part 2 gpio meets led
F9 microkernel app development part 2 gpio meets ledF9 microkernel app development part 2 gpio meets led
F9 microkernel app development part 2 gpio meets led
Benux Wei
 
F9 microkernel app development part 1
F9 microkernel app development part 1F9 microkernel app development part 1
F9 microkernel app development part 1
Benux Wei
 
F9 microkernel code reading part 4 memory management
F9 microkernel code reading part 4 memory managementF9 microkernel code reading part 4 memory management
F9 microkernel code reading part 4 memory management
Benux Wei
 
F9 Microkernel code reading part 2 scheduling
F9 Microkernel code reading part 2 schedulingF9 Microkernel code reading part 2 scheduling
F9 Microkernel code reading part 2 scheduling
Benux Wei
 
While software engineer meets 3d printer
While software engineer meets 3d printerWhile software engineer meets 3d printer
While software engineer meets 3d printer
Benux Wei
 
F9 Microkernel code reading - part 1
F9 Microkernel code reading - part 1F9 Microkernel code reading - part 1
F9 Microkernel code reading - part 1
Benux Wei
 
Tdd with python unittest for embedded c
Tdd with python unittest for embedded cTdd with python unittest for embedded c
Tdd with python unittest for embedded c
Benux Wei
 
Preparation for mit ose lab4
Preparation for mit ose lab4Preparation for mit ose lab4
Preparation for mit ose lab4
Benux Wei
 

More from Benux Wei (8)

F9 microkernel app development part 2 gpio meets led
F9 microkernel app development part 2 gpio meets ledF9 microkernel app development part 2 gpio meets led
F9 microkernel app development part 2 gpio meets led
 
F9 microkernel app development part 1
F9 microkernel app development part 1F9 microkernel app development part 1
F9 microkernel app development part 1
 
F9 microkernel code reading part 4 memory management
F9 microkernel code reading part 4 memory managementF9 microkernel code reading part 4 memory management
F9 microkernel code reading part 4 memory management
 
F9 Microkernel code reading part 2 scheduling
F9 Microkernel code reading part 2 schedulingF9 Microkernel code reading part 2 scheduling
F9 Microkernel code reading part 2 scheduling
 
While software engineer meets 3d printer
While software engineer meets 3d printerWhile software engineer meets 3d printer
While software engineer meets 3d printer
 
F9 Microkernel code reading - part 1
F9 Microkernel code reading - part 1F9 Microkernel code reading - part 1
F9 Microkernel code reading - part 1
 
Tdd with python unittest for embedded c
Tdd with python unittest for embedded cTdd with python unittest for embedded c
Tdd with python unittest for embedded c
 
Preparation for mit ose lab4
Preparation for mit ose lab4Preparation for mit ose lab4
Preparation for mit ose lab4
 

Recently uploaded

5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - HiikeSystem Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
Hiike
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Jeffrey Haguewood
 
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStrDeep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
saastr
 
Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!
GDSC PJATK
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
saastr
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
saastr
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
SitimaJohn
 
dbms calicut university B. sc Cs 4th sem.pdf
dbms  calicut university B. sc Cs 4th sem.pdfdbms  calicut university B. sc Cs 4th sem.pdf
dbms calicut university B. sc Cs 4th sem.pdf
Shinana2
 
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
alexjohnson7307
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Wask
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
Postman
 

Recently uploaded (20)

5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - HiikeSystem Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
 
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStrDeep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
 
Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
 
dbms calicut university B. sc Cs 4th sem.pdf
dbms  calicut university B. sc Cs 4th sem.pdfdbms  calicut university B. sc Cs 4th sem.pdf
dbms calicut university B. sc Cs 4th sem.pdf
 
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
 

Real practice of Networking design on specialized for ARM Cortex-M

  • 1. Real practice of Networking design on specialized for ARM Cortex-M Ben Wei (a.k.a ben6) 2013/08/03
  • 2. Right’s to copy Attribution – ShareAlike 3.0 You are free •  to copy, distribute, display, and perform the work •  to make derivative works •  to make commercial use of the work Under the following conditions •  For any reuse or distribution, you must make clear to others the license terms of this work. •  Any of these conditions can be waived if you get permission from the copyright holder. Your fair use and other rights are in no way affected by the above. Attribution. You must give the original author credit. Share Alike. If you alter, transform, or build upon this work, you may distribute the resulting work only under a license identical to this one. © Copyright 2013 juluos http://juluos.org License text: http://creativecommons.org/licenses/by-sa/3.0/legalcode
  • 3. Who am I? •  Current o  JuluOSDev, StarOS Lab •  Bio Love to try new technologies and enjoy researching topics in networking and operation system domains http://about.me/ben6
  • 4. Agenda • Why real practice topic? • Hardware Overview • Development experience sharing
  • 5. Why? Connect Internet of Things Internet of Things
  • 10. Thingsqure Tech Overview Thingsqure of Services Things Contiki-OS Router
  • 11. Connect Apps with things Connecting thermostats, light bulbs, street lights, and more
  • 13.
  • 15. STM32F407VGT6 •  32-bit ARM® Cortex™-M4-based STM32-F4 •  168MHz, upto 210 MIPS •  1MB Flash, 192KB RAM ST-LINK USB for Input USB 2.0 OTG
  • 16. Architecture diagram Network Adapter Driver TCPIP Stack (UIP, lwIP, SDP …) Application 1 Application 2 Application n Firmware Hardware ARM Board
  • 20. What’s SPI? (Input) MSB (I) LSB (I) Open
  • 22. Driver – enc28j60 Base on SPI Command with OP Code SPI Commands: RCR, RBM, WCR, WBM, BFS, BFC, SC Op Code argument data Byte 0 Byte 1
  • 23. enc28j60 Ethernet adapter SPI pinout PA5 = SCK PA6 = MISO PA7 = MOSI PE7 = CS
  • 26. F4OS
  • 28. F4OS
  • 29. Architecture diagram Network Adapter En28j60 Driver TCPIP Stack (SDP) Shell F4OS Hardware ARM Board Simple Server
  • 31. Debugging •  USB Serial Controller •  STM32 STlink
  • 32. USB Serial Console Mac OS X as example 1 Screen is your good friend sudo screen /dev/tty.usbserial 115200 2
  • 33. st-util wait gdb ben@xubuntu:~/src/github/stlink$ ./st-util 2012-06-10T22:56:32 INFO src/stlink-usb.c: -- exit_dfu_mode 2012-06-10T22:56:32 INFO src/stlink-common.c: Loading device parameters.... 2012-06-10T22:56:32 INFO src/stlink-common.c: Device connected is: F4 device, id 0x20006411 2012-06-10T22:56:32 INFO src/stlink-common.c: SRAM size: 0x30000 bytes (192 KiB), Flash: 0x100000 bytes (1024 KiB) in pages of 16384 bytes Chip ID is 00000413, Core ID is 2ba01477. KARL - should read back as 0x03, not 60 02 00 00 init watchpoints Listening at *:4242... Listening at *:4242 ./st-util
  • 34. gdb with st-util ~/F4OS$ arm-none-eabi-gdb GNU gdb (Sourcery CodeBench Lite 2012.03-56) 7.2.50.20100908-cvs Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "--host=i686-pc-linux-gnu --target=arm-none- eabi". For bug reporting instructions, please see: <https://support.codesourcery.com/GNUToolchain/>. (gdb) target remote :4242 Remote debugging using :4242 0x007f3ff4 in ?? () target remote :4242
  • 35. How to build F4OS? $ git://github.com/benwei/F4OS.git $ cd F4OS_prototype $ make clean $ make $ make burn GCC_ARM_PATH="/opt/gcc-arm-none-eabi-4_7-2013q1/bin" STLINK_PATH="$SH_PATH/stlink” export PATH="$PATH:$GCC_ARM_PATH:$STLINK_PATH" 1 2
  • 36. Write bin file to F4 $ make burn st-flash write ./out/f4os.bin 0x8000000 2013-08-01T13:28:57 INFO src/stlink-common.c: Loading device parameters.... 2013-08-01T13:28:57 INFO src/stlink-common.c: Device connected is: F4 device, id 0x20006411 2013-08-01T13:28:57 INFO src/stlink-common.c: SRAM size: 0x30000 bytes (192 KiB), Flash: 0x100000 bytes (1024 KiB) in pages of 16384 bytes 2013-08-01T13:28:57 INFO src/stlink-common.c: Attempting to write 30540 (0x774c) bytes to stm32 address: 134217728 (0x8000000) EraseFlash - Sector:0x0 Size:0x4000 Flash page at addr: 0x08000000 erasedEraseFlash - Sector:0x1 Size:0x4000 Flash page at addr: 0x08004000 erased 2013-08-01T13:28:57 INFO src/stlink-common.c: Finished erasing 2 pages of 16384 (0x4000) bytes 2013-08-01T13:28:57 INFO src/stlink-common.c: Starting Flash write for F2/F4 2013-08-01T13:28:57 INFO src/stlink-common.c: Successfully loaded flash loader in sram size: 30540 2013-08-01T13:28:58 INFO src/stlink-common.c: Starting verification of write complete 2013-08-01T13:28:58 INFO src/stlink-common.c: Flash written and verified! jolly good! st-flash write ./out/f4os.bin 0x8000000
  • 38. Summary •  Why Stm32 Networking? •  Hardware Prototype: o  STM32F4 Discovery + ENC28J60 + PL2303 •  Experience Sharing & Development tips o  How to build, burn, debug tools
  • 40. compile stlink in ubuntu sudo apt-get install autoconf libusb-1.0.0 sh autogen.sh ./configure make Tips: please don't install, just use export PATH=~/stlink/:$PATH For easier update
  • 41. STM32F407VGT6 •  microcontroller featuring 32-bit ARM Cortex-M4F core, 1 MB Flash, 192 KB RAM in an LQFP100 package •  On-board ST-LINK/V2 with selection mode switch to use the kit as a standalone ST- LINK/V2 (with SWD connector for programming and debugging) •  LIS302DL, ST MEMS motion sensor, 3-axis •  digital output accelerometer •  MP45DT02, ST MEMS audio sensor, omni- directional digital microphone •  CS43L22, audio DAC with integrated class D speaker driver •  Eight LEDs: •  USB OTG FS with micro-AB connector •  Extension header for all LQFP100 I/Os for quick connection to prototyping board and easy probing More - reference DM00037955.pdf
  • 42. References •  ENC28J60 programming guide •  http://thingsquare.com/tech/ •  http://www.contiki-os.org/ •  STM32F4DISCOVERYDiscovery kit
  • 43. CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h STM32F4 Working MHz (F4OS) #define PLL_M 25 #define PLL_M 8 -DHSE_VALUE=8000000 boot/boot_main.c 1 2