Skip to content
This repository was archived by the owner on Apr 2, 2019. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
3598314
new file: makefile
DouglasPearless Oct 22, 2016
d5abca5
modified: src/config.default
DouglasPearless Oct 22, 2016
e718ae3
modified: README.md
DouglasPearless Oct 22, 2016
92da6c4
modified: src/modules/robot/Stepper.cpp
DouglasPearless Oct 22, 2016
4ba02f8
modified: src/modules/tools/temperaturecontrol/max31855.cpp
DouglasPearless Oct 22, 2016
57ad4bc
deleted: src/Segger_SystemView/Global.h
DouglasPearless Oct 22, 2016
95e974e
modified: src/Segger_SystemView/README.md
DouglasPearless Oct 22, 2016
0e1de27
modified: src/Segger_SystemView/README.md
DouglasPearless Oct 23, 2016
c2f1e0c
modified: src/Segger_SystemView/README.md
DouglasPearless Oct 23, 2016
413dad3
modified: src/Segger_SystemView/README.md
DouglasPearless Oct 23, 2016
2d2106f
modified: src/Segger_SystemView/README.md
DouglasPearless Oct 23, 2016
544f988
modified: libs/ADC/BurstADC.cpp
DouglasPearless Oct 26, 2016
1814b10
modified: libs/ADC/BurstADC.cpp
DouglasPearless Oct 26, 2016
429dc87
modified: modules/tools/temperaturecontrol/TemperatureControlPool.cpp
DouglasPearless Oct 26, 2016
e24ba76
modified: ../README.md
DouglasPearless Oct 26, 2016
29b8eb5
modified: ../README.md
DouglasPearless Oct 26, 2016
994239d
modified: libs/Kernel.cpp
DouglasPearless Oct 26, 2016
4409222
modified: libs/Adc.cpp
DouglasPearless Oct 26, 2016
61fde90
new file: libs/md5.h
DouglasPearless Oct 26, 2016
1cc0791
modified: libs/nuts_bolts.h
DouglasPearless Oct 26, 2016
163a934
modified: libs/Kernel.cpp
DouglasPearless Oct 27, 2016
01c9acb
modified: libs/Kernel.cpp
DouglasPearless Oct 27, 2016
0a0fcf9
modified: gcc4mbed/external/mbed/libraries/mbed/hal/sleep_api.h
DouglasPearless Oct 27, 2016
fc29c16
modified: src/main.cpp
DouglasPearless Oct 27, 2016
05ed230
modified: libs/Kernel.cpp
DouglasPearless Oct 30, 2016
1ae07a5
modified: ../README.md
DouglasPearless Oct 30, 2016
9b68675
modified: ../README.md
DouglasPearless Oct 30, 2016
2f4c5c0
modified: main.cpp
DouglasPearless Oct 30, 2016
4f6a8f7
modified: ../README.md
DouglasPearless Oct 30, 2016
5796fea
modified: ../README.md
DouglasPearless Oct 31, 2016
985f37e
modified: libs/Debug/HardFault_HandlerC.c
DouglasPearless Oct 31, 2016
4ae2377
modified: README.md
DouglasPearless Nov 1, 2016
eab55b8
modified: src/modules/robot/Robot.cpp
DouglasPearless Nov 1, 2016
4f719a1
modified: config.default
DouglasPearless Nov 2, 2016
9271850
modified: ../README.md
DouglasPearless Nov 2, 2016
9c02f59
modified: libs/SlowTicker.cpp
DouglasPearless Nov 2, 2016
87b5304
modified: ../README.md
DouglasPearless Nov 2, 2016
0d5f6d3
modified: ../README.md
DouglasPearless Nov 2, 2016
2b42fb7
modified: libs/Kernel.cpp
DouglasPearless Nov 2, 2016
3ed4b98
modified: libs/Kernel.cpp
DouglasPearless Nov 6, 2016
238f9ad
Merge branch 'master' of https://github.com/Smoothieware/Smoothie2
DouglasPearless Nov 6, 2016
121cd8f
modified: ../README.md
DouglasPearless Nov 7, 2016
d863bd6
modified: config.default
DouglasPearless Nov 7, 2016
947c88e
modified: main.cpp
DouglasPearless Nov 7, 2016
125fa6b
modified: README.md
DouglasPearless Nov 7, 2016
6e2729e
Merge branch 'master' of https://github.com/DouglasPearless/Smoothie2
DouglasPearless Nov 7, 2016
5039dd6
modified: src/config.default
DouglasPearless Oct 22, 2016
12be6ab
modified: README.md
DouglasPearless Nov 7, 2016
b13114a
modified: README.md
DouglasPearless Nov 7, 2016
9581ab8
modified: config.default
DouglasPearless Nov 9, 2016
6314505
modified: src/libs/Kernel.cpp
DouglasPearless Nov 10, 2016
d113d11
modified: src/config.default
DouglasPearless Nov 10, 2016
daed78b
Merge branch 'master' into HEAD
DouglasPearless Nov 10, 2016
e595568
modified: src/modules/tools/endstops/Endstops.cpp
DouglasPearless Nov 10, 2016
77b5e49
modified: src/modules/tools/endstops/Endstops.cpp
DouglasPearless Nov 10, 2016
edfd8f1
modified: src/Segger_SystemView/README.md
DouglasPearless Nov 10, 2016
25b5f30
modified: src/Segger_SystemView/README.md
DouglasPearless Nov 10, 2016
c17c6cc
modified: .gitignore
DouglasPearless Nov 10, 2016
e6c5648
modified: libs/ADC/BurstADC.cpp
DouglasPearless Nov 10, 2016
c3ed464
Merge branch 'master' of https://github.com/DouglasPearless/Smoothie2
DouglasPearless Nov 10, 2016
bfeca01
modified: src/main.cpp
DouglasPearless Nov 10, 2016
b5ed7ca
modified: src/main.cpp
DouglasPearless Nov 10, 2016
f6163a3
modified: src/libs/SlowTicker.cpp
DouglasPearless Nov 10, 2016
2a0a565
Merge branch 'master' of https://github.com/Smoothieware/Smoothie2
DouglasPearless Nov 11, 2016
bf7d79f
Update .gitignore
DouglasPearless Nov 11, 2016
e7dc429
modified: makefile
DouglasPearless Nov 11, 2016
393f1f9
modified: modules/tools/endstops/Endstops.cpp
DouglasPearless Nov 12, 2016
a2b1ff6
Merge branch 'master' of https://github.com/DouglasPearless/Smoothie2
DouglasPearless Nov 12, 2016
d8bdb49
modified: src/config.default
DouglasPearless Nov 13, 2016
3a8459b
modified: src/config.default
DouglasPearless Nov 27, 2016
6cdf11c
modified: src/modules/robot/Planner.cpp
DouglasPearless Nov 27, 2016
a83b322
modified: src/modules/robot/Block.h
DouglasPearless Dec 1, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,17 @@
#eclipse project files
.cproject
.project

.settings/
gdbserver.log
src/Segger_SystemView/Global.h
src/Segger_SystemView/SEGGER.h
src/Segger_SystemView/SEGGER_RTT.c
src/Segger_SystemView/SEGGER_RTT.h
src/Segger_SystemView/SEGGER_RTT_Conf.h
src/Segger_SystemView/SEGGER_SYSVIEW.c
src/Segger_SystemView/SEGGER_SYSVIEW.h
src/Segger_SystemView/SEGGER_SYSVIEW_Conf.h
src/Segger_SystemView/SEGGER_SYSVIEW_ConfDefaults.h
src/Segger_SystemView/SEGGER_SYSVIEW_Config_NoOS.c
src/Segger_SystemView/SEGGER_SYSVIEW_Int.h
README.md
62 changes: 38 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,29 @@
# Smoothie2

A Smoothie firmware port to the Smoothieboard v2 boards.
A Smoothie firmware port to the Bambino210E board ahead of making changes to support the SmoothieV2 hardware.

Current status : Gcode processing, motion planning, and step generation work. Many secondary features need porting, and some major lower level things need implementation ( USB, Ethernet, SDIO ).
There are no guarantees that this code works, won't burn down your house or destroy your electronics or hardware, use entirely at your own risk.

There are a lot of bugs in the code and it is very much a work in progress, the reason it is published is to allow others to contribute before it is folded back into the Smoothie2 main repo.

#IF YOU ARE NOT A CODER / WORKING ON THIS CODE BASE DO NOT TRY TO USE THIS UNTIL THE CODE HAS BEEN FULLY PORTED AND TESTED

Current status as at 2016-11-08:
* SlowTicker code finally ported, but there are timing issues that need to be solved, including interrupt priorities to get it working properly (for end-stops for instance)
* The current focus is getting all the timing and interrupts and interrupt priorities sorted, then continue testing of ported code.
* Merged changes 65fb13e and c3f254c to bring codebase current with Smoothie V2 main repo
* Moved open issues to issue tracker
* This code base is equivalent to Smoothie V1 as at 2016-10-18 and Smoothie V2 as at 2016-11-08
* The code that relies on the priority setting of GPIO interrupts has not had this feature migrated (e.g. laser)
* Some major lower level things need implementation ( USB, Ethernet, SDIO ).
* There some changes in `gcc4mbed/external/mbed/libraries/mbed/hal/sleep_api.h` which appear to be driven by Silicon Labs changes to support their EFM32 range of ARM processor's lower power modes. This causes conflicts with `sleep` and I have had to slightly modify this file to get our code to compile and work properly. I don't have time to go back and investigate this at this time.

There are a lot of bugs in the code and it is very much a work in progress, the reason it is published is to allow others to contriute before it is folded back into the Smoothie2 main repo.

Current status :
* This code base is equivalent to Smoothie V1 as at 2016-10-18.
* The Extruder code is being worked on and as of 2016-10-22 and does not yet compile.
* Some major lower level things need implementation ( USB, Ethernet, SDIO ).

# Compiling

Expand All @@ -27,50 +48,43 @@ And finally compile the code
make

# Board Specific Programming/Debugging Notes
* [Smoothie2 Pro Proto1 Boards](https://github.com/Smoothieware/Smoothie2/blob/master/notes/Smoothie2Proto1-board.creole#smoothie2-board-programmingdebugging-notes)
* [Bambino210E Boards](https://github.com/Smoothieware/Smoothie2/blob/master/notes/Bambino210E-board.creole#bambino210e-board-programmingdebugging-notes)

# TODO : 

Current major TODOs : 
* Porting of existing functionality that hasn't been ported yet ( anything in https://github.com/Smoothieware/Smoothieware/tree/edge/src/modules that isn't ported yet )
* Some modules have been ported, but the underlying low-level/HAL stuff to talk to the peripherals isn't ( like SPI, or ADCs etc ), it's just dummy objects right now. So that needs porting too.
* USB and Ethernet need to be implemented.
* Doing the step generation on the M0 co-processor instead of on the M4 main core.
* This port was forked from Smoothie months ago, it should be updated to incoprorate changes to Smoothie done in the meantime.
* Explore using http://nuttx.org/ for a RTOS ( major rewrite )
* SD-Card, USB and Ethernet need to be implemented, awaiting base libraries from Micromint.com.
* Move the step generation to the M0 co-processor instead of on the M4 main core OR into a FPGA.

TODO functionality to port from v1 in more detail :
* libs/Adc.cpp : Port low level ADC functionality, then re-enable it in TemperatureControl ( note : there is some weird pin configuration surrounding this that makes it more complicated than it seems, but I don't remember what it is. [email protected] probably remembers what it is ).
* libs/md5.cpp : Port and re-enable in SimpleShell
* libs/Network : Port and enable
* libs/Network : Port and enable once base libraries are available
* [@adamgreen](https://github.com/adamgreen) - libs/SDFAT.cpp : Port for SPI SD card access, not SDIO, and re-enable. Then add SDIO support.
* [@adamgreen](https://github.com/adamgreen) - libs/SPI.cpp : Port and make to use the mBed library instead of registers
* libs/USBDevice : Port and enable
* libs/USBDevice : Port and enable once base libraries are available
* libs/Watchdog : Port ( no mBed libraries available that I could find )
* libs/Hook.h : Uses doubles instead of ints ( in v1 ) for some reason, should be fixed
* modules/tools/drillingcycles : Port ( should be fairly simple )
* modules/tools/extruder : Port
* modules/tools/filamentdetector : Get PWM to work
* modules/tools/spindle : Get PWM to work
* modules/tools/temperaturecontrol : Finish porting, get the ADC to actually work, I cannot test the AD8495 temperature inputs as I don't have one of these!
* modules/tools/zprobe : Ported Needs testing (2016-11-08)
* modules/tools/drillingcycles : Ported Needs testing (2016-11-08)
* modules/tools/extruder : Ported Needs testing (2016-11-08)
* modules/tools/filamentdetector : Port
* modules/tools/filamentdetector : Get PWM to work
* modules/tools/scaracal : Port
* modules/tools/spindle : Port and get PWM to work
* modules/tools/spindle : Get PWM to work
* modules/tools/temperaturecontrol : Finish porting, get the ADC to actually work, port the AD8495 temperature input
* modules/tools/temperatureswitch : Port ( should be fairly easy )
* modules/tools/toolmanager : Port ( should be trivial, is needed for Extruder )
* modules/tools/touchprobe : Port ( could be quite easy )
* modules/tools/zprobe : Port ( could be quite easy )
* modules/tools/simpleshell : Port
* modules/tools/zprobe : Ported Needs testing (2016-11-08)
* modules/tools/simpleshell : Port once USB ported

* The FPGA requires a SGPIO spi library
* The FPGA requires a way to flash a .bin to it over JTAG from the M4

Things that are broken during the port and should be added back as things progress ( some things might be missing here. I try to use the TOADDBACK label when commenting things so search for that too ) : 

* In GcodeDispatch.cpp : Removed dependency to Pauser.h
* In Switch.cpp : Commented out all of the set_low_on_debug stuff
* In Switch.cpp : Commented out all of the set_low_on_debug stuff; do we still need this?
* In SlowTicker.h and Hook.h : Using doubles instead of ints for intervals/frequencies and counting down. Done to accomodate mBed, but dirty costly hack
* In SlowTicker.h : Assuming it's fine to use mBed for this, we can remove a lot of code and just rely fully on mBed
* In RingBuffer.h : Removed the irq stuff
* In Laser.cpp : PWM pin is broken, needs to be fixed

Expand All @@ -87,4 +101,4 @@ Planned refactors ( only to be done when the basic port is done ) : 
* Try to read config directly from SD card without cache ( as smoothie used to do ) now that we have SDIO
* Queue refactor ( see wiki )
* Adding MTP and removing MSD for USB
* Full rewrite based on a RTOS
* Explore using http://nuttx.org/ for a RTOS ( major rewrite )
3 changes: 2 additions & 1 deletion gcc4mbed/external/mbed/libraries/mbed/hal/sleep_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@

#include "device.h"

#if DEVICE_SLEEP
//#if DEVICE_SLEEP //TODO THIS WAS THE ORIGINAL BUT CONFLICTS WITH OTHER DEFINITION OF SLEEP
#ifndef DEVICE_SLEEP

#ifdef __cplusplus
extern "C" {
Expand Down
35 changes: 35 additions & 0 deletions makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@

#DIRS = gcc4mbed src
DIRS = src
DIRSCLEAN = $(addsuffix .clean,$(DIRS))

all:
# @ $(MAKE) -C gcc4mbed
@echo Building Smoothie
@ $(MAKE) -C src

clean: $(DIRSCLEAN)

$(DIRSCLEAN): %.clean:
@echo Cleaning $*
@ $(MAKE) -C $* clean

debug-store:
@ $(MAKE) -C src debug-store

flash:
@ $(MAKE) -C src flash

dfu:
@ $(MAKE) -C src dfu

upload:
@ $(MAKE) -C src upload

debug:
@ $(MAKE) -C src debug

console:
@ $(MAKE) -C src console

.PHONY: all $(DIRS) $(DIRSCLEAN) debug-store flash upload debug console dfu
50 changes: 50 additions & 0 deletions src/Segger_SystemView/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#Segger JTrace SystemView debugging and integration

Go to http://www.segger.com and download their SystemView free tool and copy only some of the source code files so you end up with the following files:
```
src/Segger_SystemView/SEGGER_SYSVIEW_Int.h
src/Segger_SystemView/Global.h
src/Segger_SystemView/SEGGER.h
src/Segger_SystemView/SEGGER_RTT.c
src/Segger_SystemView/SEGGER_RTT.h
src/Segger_SystemView/SEGGER_RTT_Conf.h
src/Segger_SystemView/SEGGER_SYSVIEW.c
src/Segger_SystemView/SEGGER_SYSVIEW.h
src/Segger_SystemView/SEGGER_SYSVIEW_Conf.h
src/Segger_SystemView/SEGGER_SYSVIEW_ConfDefaults.h
src/Segger_SystemView/SEGGER_SYSVIEW_Config_NoOS.c
```

You will need to make the following changes in src/Segger_SystemView/SEGGER_SYSVIEW_Config_NoOS.c

old
```
#define SYSVIEW_APP_NAME "Demo Application"
```
new
```
#define SYSVIEW_APP_NAME "Smoothie2"
```
old
```
SEGGER_SYSVIEW_SendSysDesc("I#15=SysTick");
```
new (note the line is long and scrolls off the right hand side of the page, make sure you copy it all)
```
SEGGER_SYSVIEW_SendSysDesc("I#15=SysTick,I#27=acceleration_tick(),I#28=step_tick(),I#29=unstep_tick(),I#30=Timer2,I#100=Endstops::Endstops()");
```
If you find that you are running out of buffering between the CPU and your PC, then change src/Segger_SystemView/SEGGER_SYSVIEW_ConfDefaults.h as follows

old
```
#define SEGGER_SYSVIEW_RTT_BUFFER_SIZE 1024
```
new
```
#define SEGGER_SYSVIEW_RTT_BUFFER_SIZE 4096
```
Note: 4096 is the largest buffer size supported; you can also increase the speed of the JTAG interface to 15MHz when you start your JLinkGDBServer:

JLinkGDBServer -if jtag -device LPC4330 -speed 15000

Note: I run my JLinkGDBServer on a separate Ubuntu machine onto which my Firepick is attached and use TCP/IP to connect to it.
Loading