-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Still broken, cannot fix "c++: error: unrecognized command-line optio…
…n ‘--opt-code-size’~"
- Loading branch information
1 parent
40a1baa
commit c00bd83
Showing
6 changed files
with
106 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"build": { | ||
"f_cpu": "24000000", | ||
"size_iram": 256, | ||
"size_xram": 1024, | ||
"size_code": 14336, | ||
"size_heap": 128, | ||
"mcu": "ch552t", | ||
"cpu": "mcs51" | ||
}, | ||
"frameworks": [], | ||
"upload": { | ||
"maximum_ram_size": 1280, | ||
"maximum_size": 14336, | ||
"protocol": "stcgal", | ||
"stcgal_protocol": "stc15", | ||
"protocols": ["stcgal"] | ||
}, | ||
"name": "Generic CH552", | ||
"url": "http://www.wch.cn/product/CH552.html", | ||
"vendor": "WCH" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Import("env") | ||
env.Append(LINKFLAGS=["--model-medium"]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,9 @@ | ||
[env:ATmega8] | ||
framework = arduino | ||
platform = atmelavr | ||
board = ATmega8 | ||
[env:CH552G] | ||
platform = intel_mcs51 | ||
board = ch552 | ||
|
||
; # Upload method | ||
; upload_protocol = usbasp # For tag-connect | ||
extra_scripts = link_medium.py | ||
|
||
; Dont check packages (bug in avr for attiny?) | ||
check_skip_packages = yes | ||
|
||
# Deps | ||
lib_deps = | ||
Arduino-Lufa | ||
build_flags = | ||
-Wall | ||
-I$PROJECT_PACKAGES_DIR/toolchain-sdcc/include/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#include "delay.h" | ||
|
||
#define MAIN_Fosc 16000000L //Define the clock | ||
//#define MAIN_Fosc 11059200L //Define the clock | ||
|
||
void delay_c_ms(unsigned char ms) //Software delay in mili-sec | ||
{ //Calibrated for STC on SDCC | ||
unsigned int i; | ||
do | ||
{ | ||
i = MAIN_Fosc / 13000; | ||
while (--i); // 14T per loop | ||
} while (--ms); | ||
} | ||
|
||
void delay_c_ds(unsigned char ds) //Software delay in deci-sec | ||
{ //Calibrated for STC on SDCC | ||
unsigned int i; | ||
do | ||
{ | ||
i = MAIN_Fosc / 1300; | ||
while (--i); // 14T per loop | ||
} while (--ds); | ||
} | ||
|
||
void delay_s_ms(unsigned char ms) //Software delay in mili-sec | ||
{ //Calibrated for Nuvoton N76E003 | ||
ms; //Must declare delay variable | ||
__asm | ||
MOV R2,dpl //Variable ms was passed via dpl | ||
00001$: MOV R1,#0x08 //8 x 12.5ms produces 1ms total | ||
00002$: MOV R0,#0xFA //FA is 12.5ms (or C7 is 100us) | ||
00003$: DJNZ R0,00003$ | ||
DJNZ R1,00002$ | ||
DJNZ R2,00001$ | ||
__endasm; | ||
} | ||
|
||
void delay_s_ds(unsigned char ds) //Software delay in deci-sec | ||
{ //Calibrated for Nuvoton N76E003 | ||
ds; //Must declare delay variable | ||
__asm | ||
MOV R2,dpl //Variable ds was passed via dpl | ||
00001$: MOV R1,#0x50 //80 x 12.5ms produces 1ds total | ||
00002$: MOV R0,#0xFA //FA is 12.5ms (or C7 is 100us) | ||
00003$: DJNZ R0,00003$ | ||
DJNZ R1,00002$ | ||
DJNZ R2,00001$ | ||
__endasm; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#ifndef __DELAY_H | ||
#define __DELAY_H | ||
|
||
void delay_c_ms(unsigned char ms); | ||
void delay_s_ms(unsigned char ms); | ||
void delay_c_ds(unsigned char ds); | ||
void delay_s_ds(unsigned char ds); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters