Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
portability-refactor [2017/01/25 15:53]
arthur
portability-refactor [2017/01/25 18:35] (current)
arthur
Line 34: Line 34:
 There is a surprisingly small number of files that contain '​LPC'​. There is a surprisingly small number of files that contain '​LPC'​.
 Here's what FF proposes to do abouth them Here's what FF proposes to do abouth them
-{{libs/​ADC/​adc.cpp}} -> ?+<kbd>libs/​ADC/​adc.cpp</​kbd> ​-> ?
 > adc.cpp is a special ADC library for mBed that does burst mode, where the normal mBed lib does not. it should be moved to the HAL --arthur > adc.cpp is a special ADC library for mBed that does burst mode, where the normal mBed lib does not. it should be moved to the HAL --arthur
-{{./​libs/​FPointer.h}} -> just a comment about data sizes -> Replace with ARM c3+<kbd>./​libs/​FPointer.h</​kbd> ​-> just a comment about data sizes -> Replace with ARM c3
 > Jim says, should use std::​function --arthur > Jim says, should use std::​function --arthur
 >> The only place FPointer is used is in Hook.cpp - it derives a class adding interval and countdown. Could be combined? --Flo >> The only place FPointer is used is in Hook.cpp - it derives a class adding interval and countdown. Could be combined? --Flo
-{{./​libs/​Kernel.cpp}} -> Timer init -> move to HAL +<kbd>./​libs/​Kernel.cpp</​kbd> ​-> Timer init -> move to HAL 
-{{./​libs/​MRI_Hooks.cpp}} -> debug interface -> Ports will need to include their own hardware specific debug interface (e.g. ST-Link) +<kbd>./​libs/​MRI_Hooks.cpp</​kbd> ​-> debug interface -> Ports will need to include their own hardware specific debug interface (e.g. ST-Link) 
-{{./​libs/​Network/​uip/​Network.cpp}} -> Ethernet is LPC specific. -> move to HAL +<kbd>./​libs/​Network/​uip/​Network.cpp</​kbd> ​-> Ethernet is LPC specific. -> move to HAL 
-{{./​libs/​Network/​uip/​Network.h}} -> move to HAL +<kbd>./​libs/​Network/​uip/​Network.h</​kbd> ​-> move to HAL 
-{{./​libs/​Pin.h}} -> GPIO -> separate into abstract base and hardware specific implementation,​ move the later to HAL. Possibly a good mBed candidate.+<kbd>./​libs/​Pin.h</​kbd> ​-> GPIO -> separate into abstract base and hardware specific implementation,​ move the later to HAL. Possibly a good mBed candidate.
 > Pin is very very time-critical and should not use mBed ( also, we need not to use any additional ram ), so this should just move to the HAL --arthur > Pin is very very time-critical and should not use mBed ( also, we need not to use any additional ram ), so this should just move to the HAL --arthur
-{{./​libs/​RingBuffer.h}} -> Not sure why the header is included here -> remove. +<kbd>./​libs/​RingBuffer.h</​kbd> ​-> Not sure why the header is included here -> remove. 
-{{./​libs/​SlowTicker.h}} -> __disable_irq / __enable_irq -> replace with macro from HAL+<kbd>./​libs/​SlowTicker.h</​kbd> ​-> __disable_irq / __enable_irq -> replace with macro from HAL
 > That's common to all Cortex-M, so it shouldn'​t go in a HAL --arthur > That's common to all Cortex-M, so it shouldn'​t go in a HAL --arthur
-{{./​libs/​StepTicker.cpp}} ->​Tickers -> move HAL +<kbd>./​libs/​StepTicker.cpp</​kbd> ​->​Tickers -> move HAL 
-{{./​libs/​USBDevice/​DFU.cpp}} -> move to HAL +<kbd>./​libs/​USBDevice/​DFU.cpp</​kbd> ​-> move to HAL 
-{{./​libs/​USBDevice/​USB.cpp}} -> comment only -> still move the complete USBDevice to HAL +<kbd>./​libs/​USBDevice/​USB.cpp</​kbd> ​-> comment only -> still move the complete USBDevice to HAL 
-{{./​libs/​USBDevice/​USBDevice/​USBEndpoints.h}} -> Same. +<kbd>./​libs/​USBDevice/​USBDevice/​USBEndpoints.h</​kbd> ​-> Same. 
- ​* ​{{./​libs/​USBDevice/​USBSerial/​CircBuffer.h}} -> irq enable/​disable -> see {{SlowTicker.h}}+ ​* ​<kbd>./​libs/​USBDevice/​USBSerial/​CircBuffer.h</​kbd> ​-> irq enable/​disable -> see <kbd>SlowTicker.h</​kbd>​
 > Same remark --arthur > Same remark --arthur
-{{./​libs/​gpio.cpp}} -> Again not sure why the header'​s included here -> move HAL. First candidate for mBed. +<kbd>./​libs/​gpio.cpp</​kbd> ​-> Again not sure why the header'​s included here -> move HAL. First candidate for mBed. 
-{{./​libs/​spi_hal.h}} -> A non Mbed HAL -> move to HAL +<kbd>./​libs/​spi_hal.h</​kbd> ​-> A non Mbed HAL -> move to HAL 
-{{./​libs/​utils.cpp}} -> Watchdog timer setup. -> move to HAL. +<kbd>./​libs/​utils.cpp</​kbd> ​-> Watchdog timer setup. -> move to HAL. 
-{{./main.cpp}} -> There are some memory section directives in here. -> Move USB init to HAL (AHBSRAM0 directives),​ not sure about AHB0 object+<kbd>./main.cpp</​kbd> ​-> There are some memory section directives in here. -> Move USB init to HAL (AHBSRAM0 directives),​ not sure about AHB0 object
 > « That can't move », «they can be handled in the linker directoves for different chips» says Jim --arthur > « That can't move », «they can be handled in the linker directoves for different chips» says Jim --arthur
-{{./makefile}} -> my suggestion would be to provide a makefile (in subfolders) per target board.+<kbd>./makefile</​kbd> ​-> my suggestion would be to provide a makefile (in subfolders) per target board.
 > no change to the makefile system should be made. a new makefile can be made in a separate branch when a port is actually started --arthur > no change to the makefile system should be made. a new makefile can be made in a separate branch when a port is actually started --arthur
-{{./​modules/​tools/​spindle/​Spindle.cpp}} -> IRQ priority setting. -> HAL function. +<kbd>./​modules/​tools/​spindle/​Spindle.cpp</​kbd> ​-> IRQ priority setting. -> HAL function. 
-{{./​modules/​utils/​simpleshell/​SimpleShell.cpp}} -> Debug statement what cpu's being used. -> new HAL function.+<kbd>./​modules/​utils/​simpleshell/​SimpleShell.cpp</​kbd> ​-> Debug statement what cpu's being used. -> new HAL function.
  
  
 == Open Questions == Open Questions
 * What's the difference between the clasess in GPIO and Pin? Pin is used just about everywhere, GPIO only in Step/​SlowTicker.cpp - once to apperantly toggle some Leds, once to optionally toggle a debug pin. Any reason not to replace these two instances with Pin and remove GPIO? --Flo * What's the difference between the clasess in GPIO and Pin? Pin is used just about everywhere, GPIO only in Step/​SlowTicker.cpp - once to apperantly toggle some Leds, once to optionally toggle a debug pin. Any reason not to replace these two instances with Pin and remove GPIO? --Flo