From a24bccd1af6315ee9a7a127e11bfb7d54b05a222 Mon Sep 17 00:00:00 2001 From: Skip Hansen Date: Fri, 3 Nov 2023 16:21:02 -0700 Subject: [PATCH] Added scripts to build/use a local copy of sdcc version 4.2.0. --- .gitignore | 2 ++ README.md | 2 +- sdcc/README.md | 34 ++++++++++++++++++++++++++++++++++ sdcc/build_sdcc.sh | 34 ++++++++++++++++++++++++++++++++++ sdcc/setup.sh | 26 ++++++++++++++++++++++++++ sdcc/unset.sh | 19 +++++++++++++++++++ 6 files changed, 116 insertions(+), 1 deletion(-) create mode 100755 sdcc/README.md create mode 100755 sdcc/build_sdcc.sh create mode 100755 sdcc/setup.sh create mode 100755 sdcc/unset.sh diff --git a/.gitignore b/.gitignore index 9b5ed19d..1603dcba 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,5 @@ *.bin *.lk *.o +sdcc/sdcc + diff --git a/README.md b/README.md index 6577ab20..196c960f 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ After programming the ESP32, make sure to also program the filesystem. This will ## Hints and excuses: - There is no warranty whatsoever. Nothing. Not implied or otherwise suggested. This code isn't fit for anything. Please don't use this code to do nasty things. - Do a ```make clean``` between building for different boards. It really helps! -- This repo builds on SDCC 4.2.0 for Linux. Different SDCC versions can behave VERY differently. +- This repo builds on SDCC 4.2.0 for Linux. Different SDCC versions can behave VERY differently. Source sdcc/setup.sh to setup build a local copy and use it for compiling. - We are happy and honored to see your pull requests! But please, no code/indent style changes :) ## Credits diff --git a/sdcc/README.md b/sdcc/README.md new file mode 100755 index 00000000..e6c81207 --- /dev/null +++ b/sdcc/README.md @@ -0,0 +1,34 @@ +This subdirectory contains scripts to build the correct version of SDCC 4.2.0 for compiling 8051 based firmware. + +To use simply source setup.sh before building. The first time setup.sh is run proper version of SDCC sources will be checkout from github and built locally. +Finally the environment variable CC will be set to 'sdcc' and the path to the local version of sdcc will be added to the beginning of the path. + +The script unset.sh can be source to unset the CC environment variable and to restore the path. + +For example + +```` +skip@Dell-7040:~/esl/OpenEPaperLink$ cd zbs243_AP_FW +skip@Dell-7040:~/esl/OpenEPaperLink/zbs243_AP_FW$ . ../sdcc/setup.sh +Cloning into 'sdcc'... +remote: Enumerating objects: 118789, done. +remote: Counting objects: 0% (1/22838) remote: Counting objects: 1% (229/22838) remote: Counting objects: 2% (457/22838) remote: Counting objects: 3% (686/22838) remote: Counting objects: 4% (914/22838) remote: Counting objects: 5% (1142/22838) remote: Counting objects: 6% (1371/22838) remote: Counting objects: 7% (1599/22838) remote: Counting objects: 8% (1828/22838) remote: Counting objects: 9% (2056/22838) remote: Counting objects: 10% (2284/22838) remote: Counting objects: 11% (2513/22838) remote: Counting objects: 12% (2741/22838) remote: Counting objects: 13% (2969/22838) remote: Counting objects: 14% (3198/22838) remote: Counting objects: 15% (3426/22838) remote: Counting objects: 16% (3655/22838) remote: Counting objects: 17% (3883/22838) remote: Counting objects: 18% (4111/22838) remote: Counting objects: 19% (4340/22838) remote: Counting objects: 20% (4568/22838) remote: Counting objects: 21% (4796/22838) remote: Counting objects: 22% (5025/22838) remote: Counting objects: 23% (5253/22838) remote: Counting objects: 24% (5482/22838) remote: Counting objects: 25% (5710/22838) remote: Counting objects: 26% (5938/22838) remote: Counting objects: 27% (6167/22838) remote: Counting objects: 28% (6395/22838) remote: Counting objects: 29% (6624/22838) remote: Counting objects: 30% (6852/22838) remote: Counting objects: 31% (7080/22838) remote: Counting objects: 32% (7309/22838) remote: Counting objects: 33% (7537/22838) remote: Counting objects: 34% (7765/22838) remote: Counting objects: 35% (7994/22838) remote: Counting objects: 36% (8222/22838) remote: Counting objects: 37% (8451/22838) remote: Counting objects: 38% (8679/22838) remote: Counting objects: 39% (8907/22838) remote: Counting objects: 40% (9136/22838) remote: Counting objects: 41% (9364/22838) remote: Counting objects: 42% (9592/22838) remote: Counting objects: 43% (9821/22838) remote: Counting objects: 44% (10049/22838) remote: Counting objects: 45% (10278/22838) remote: Counting objects: 46% (10506/22838) remote: Counting objects: 47% (10734/22838) remote: Counting objects: 48% (10963/22838) remote: Counting objects: 49% (11191/22838) remote: Counting objects: 50% (11419/22838) remote: Counting objects: 51% (11648/22838) remote: Counting objects: 52% (11876/22838) remote: Counting objects: 53% (12105/22838) remote: Counting objects: 54% (12333/22838) remote: Counting objects: 55% (12561/22838) remote: Counting objects: 56% (12790/22838) remote: Counting objects: 57% (13018/22838) remote: Counting objects: 58% (13247/22838) remote: Counting objects: 59% (13475/22838) remote: Counting objects: 60% (13703/22838) remote: Counting objects: 61% (13932/22838) remote: Counting objects: 62% (14160/22838) remote: Counting objects: 63% (14388/22838) remote: Counting objects: 64% (14617/22838) remote: Counting objects: 65% (14845/22838) remote: Counting objects: 66% (15074/22838) remote: Counting objects: 67% (15302/22838) remote: Counting objects: 68% (15530/22838) remote: Counting objects: 69% (15759/22838) remote: Counting objects: 70% (15987/22838) remote: Counting objects: 71% (16215/22838) remote: Counting objects: 72% (16444/22838) remote: Counting objects: 73% (16672/22838) remote: Counting objects: 74% (16901/22838) remote: Counting objects: 75% (17129/22838) remote: Counting objects: 76% (17357/22838) remote: Counting objects: 77% (17586/22838) remote: Counting objects: 78% (17814/22838) remote: Counting objects: 79% (18043/22838) remote: Counting objects: 80% (18271/22838) remote: Counting objects: 81% (18499/22838) remote: Counting objects: 82% (18728/22838) remote: Counting objects: 83% (18956/22838) remote: Counting objects: 84% (19184/22838) remote: Counting objects: 85% (19413/22838) remote: Counting objects: 86% (19641/22838) remote: Counting objects: 87% (19870/22838) remote: Counting objects: 88% (20098/22838) remote: Counting objects: 89% (20326/22838) remote: Counting objects: 90% (20555/22838) remote: Counting objects: 91% (20783/22838) remote: Counting objects: 92% (21011/22838) remote: Counting objects: 93% (21240/22838) remote: Counting objects: 94% (21468/22838) remote: Counting objects: 95% (21697/22838) remote: Counting objects: 96% (21925/22838) remote: Counting objects: 97% (22153/22838) remote: Counting objects: 98% (22382/22838) remote: Counting objects: 99% (22610/22838) remote: Counting objects: 100% (22838/22838) remote: Counting objects: 100% (22838/22838), done. +remote: Compressing objects: 0% (1/6368) remote: Compressing objects: 1% (64/6368) remote: Compressing objects: 2% (128/6368) remote: Compressing objects: 3% (192/6368) remote: Compressing objects: 4% (255/6368) remote: Compressing objects: 5% (319/6368) remote: Compressing objects: 6% (383/6368) remote: Compressing objects: 7% (446/6368) remote: Compressing objects: 8% (510/6368) remote: Compressing objects: 9% (574/6368) remote: Compressing objects: 10% (637/6368) remote: Compressing objects: 11% (701/6368) remote: Compressing objects: 12% (765/6368) remote: Compressing objects: 13% (828/6368) remote: Compressing objects: 14% (892/6368) remote: Compressing objects: 15% (956/6368) remote: Compressing objects: 16% (1019/6368) remote: Compressing objects: 17% (1083/6368) remote: Compressing objects: 18% (1147/6368) remote: Compressing objects: 19% (1210/6368) remote: Compressing objects: 20% (1274/6368) remote: Compressing objects: 21% (1338/6368) remote: Compressing objects: 22% (1401/6368) remote: Compressing objects: 23% (1465/6368) remote: Compressing objects: 24% (1529/6368) remote: Compressing objects: 25% (1592/6368) remote: Compressing objects: 26% (1656/6368) remote: Compressing objects: 27% (1720/6368) remote: Compressing objects: 28% (1784/6368) remote: Compressing objects: 29% (1847/6368) remote: Compressing objects: 30% (1911/6368) remote: Compressing objects: 31% (1975/6368) remote: Compressing objects: 32% (2038/6368) remote: Compressing objects: 33% (2102/6368) remote: Compressing objects: 34% (2166/6368) remote: Compressing objects: 35% (2229/6368) remote: Compressing objects: 36% (2293/6368) remote: Compressing objects: 37% (2357/6368) remote: Compressing objects: 38% (2420/6368) remote: Compressing objects: 39% (2484/6368) remote: Compressing objects: 40% (2548/6368) remote: Compressing objects: 40% (2549/6368) remote: Compressing objects: 41% (2611/6368) remote: Compressing objects: 42% (2675/6368) remote: Compressing objects: 43% (2739/6368) remote: Compressing objects: 44% (2802/6368) remote: Compressing objects: 45% (2866/6368) remote: Compressing objects: 46% (2930/6368) remote: Compressing objects: 47% (2993/6368) remote: Compressing objects: 48% (3057/6368) remote: Compressing objects: 49% (3121/6368) remote: Compressing objects: 50% (3184/6368) remote: Compressing objects: 51% (3248/6368) remote: Compressing objects: 52% (3312/6368) remote: Compressing objects: 53% (3376/6368) remote: Compressing objects: 54% (3439/6368) remote: Compressing objects: 55% (3503/6368) remote: Compressing objects: 56% (3567/6368) remote: Compressing objects: 57% (3630/6368) remote: Compressing objects: 58% (3694/6368) remote: Compressing objects: 59% (3758/6368) remote: Compressing objects: 60% (3821/6368) remote: Compressing objects: 61% (3885/6368) remote: Compressing objects: 62% (3949/6368) remote: Compressing objects: 63% (4012/6368) remote: Compressing objects: 64% (4076/6368) remote: Compressing objects: 65% (4140/6368) remote: Compressing objects: 66% (4203/6368) remote: Compressing objects: 67% (4267/6368) remote: Compressing objects: 68% (4331/6368) remote: Compressing objects: 69% (4394/6368) remote: Compressing objects: 70% (4458/6368) remote: Compressing objects: 71% (4522/6368) remote: Compressing objects: 72% (4585/6368) remote: Compressing objects: 73% (4649/6368) remote: Compressing objects: 74% (4713/6368) remote: Compressing objects: 75% (4776/6368) remote: Compressing objects: 76% (4840/6368) remote: Compressing objects: 77% (4904/6368) remote: Compressing objects: 78% (4968/6368) remote: Compressing objects: 79% (5031/6368) remote: Compressing objects: 80% (5095/6368) remote: Compressing objects: 81% (5159/6368) remote: Compressing objects: 82% (5222/6368) remote: Compressing objects: 83% (5286/6368) remote: Compressing objects: 84% (5350/6368) remote: Compressing objects: 85% (5413/6368) remote: Compressing objects: 86% (5477/6368) remote: Compressing objects: 87% (5541/6368) remote: Compressing objects: 88% (5604/6368) remote: Compressing objects: 89% (5668/6368) remote: Compressing objects: 90% (5732/6368) remote: Compressing objects: 91% (5795/6368) remote: Compressing objects: 92% (5859/6368) remote: Compressing objects: 93% (5923/6368) remote: Compressing objects: 94% (5986/6368) remote: Compressing objects: 95% (6050/6368) remote: Compressing objects: 96% (6114/6368) remote: Compressing objects: 97% (6177/6368) remote: Compressing objects: 98% (6241/6368) remote: Compressing objects: 99% (6305/6368) remote: Compressing objects: 100% (6368/6368) remote: Compressing objects: 100% (6368/6368), done. +Receiving objects: 0% (1/118789) Receiving objects: 1% (1188/118789) Receiving objects: 2% (2376/118789) Receiving objects: 3% (3564/118789) Receiving objects: 4% (4752/118789) Receiving objects: 5% (5940/118789) Receiving objects: 6% (7128/118789) Receiving objects: 7% (8316/118789) Receiving objects: 8% (9504/118789) Receiving objects: 9% (10692/118789), 5.33 MiB | 10.65 MiB/s Receiving objects: 10% (11879/118789), 5.33 MiB | 10.65 MiB/s Receiving objects: 10% (12608/118789), 11.75 MiB | 11.74 MiB/s Receiving objects: 11% (13067/118789), 11.75 MiB | 11.74 MiB/s Receiving objects: 12% (14255/118789), 11.75 MiB | 11.74 MiB/s Receiving objects: 13% (15443/118789), 11.75 MiB | 11.74 MiB/s Receiving objects: 14% (16631/118789), 11.75 MiB | 11.74 MiB/s Receiving objects: 15% (17819/118789), 17.61 MiB | 11.73 MiB/s Receiving objects: 15% (17836/118789), 17.61 MiB | 11.73 MiB/s Receiving objects: 16% (19007/118789), 23.46 MiB | 11.73 MiB/s Receiving objects: 17% (20195/118789), 23.46 MiB | 11.73 MiB/s Receiving objects: 18% (21383/118789), 23.46 MiB | 11.73 MiB/s Receiving objects: 19% (22570/118789), 23.46 MiB | 11.73 MiB/s Receiving objects: 20% (23758/118789), 23.46 MiB | 11.73 MiB/s Receiving objects: 21% (24946/118789), 23.46 MiB | 11.73 MiB/s Receiving objects: 22% (26134/118789), 23.46 MiB | 11.73 MiB/s Receiving objects: 23% (27322/118789), 29.33 MiB | 11.73 MiB/s Receiving objects: 24% (28510/118789), 29.33 MiB | 11.73 MiB/s Receiving objects: 25% (29698/118789), 29.33 MiB | 11.73 MiB/s Receiving objects: 26% (30886/118789), 29.33 MiB | 11.73 MiB/s Receiving objects: 26% (31164/118789), 29.33 MiB | 11.73 MiB/s Receiving objects: 27% (32074/118789), 35.19 MiB | 11.73 MiB/s Receiving objects: 28% (33261/118789), 35.19 MiB | 11.73 MiB/s Receiving objects: 29% (34449/118789), 35.19 MiB | 11.73 MiB/s Receiving objects: 30% (35637/118789), 41.05 MiB | 11.73 MiB/s Receiving objects: 31% (36825/118789), 41.05 MiB | 11.73 MiB/s Receiving objects: 32% (38013/118789), 41.05 MiB | 11.73 MiB/s Receiving objects: 33% (39201/118789), 41.05 MiB | 11.73 MiB/s Receiving objects: 34% (40389/118789), 41.05 MiB | 11.73 MiB/s Receiving objects: 35% (41577/118789), 41.05 MiB | 11.73 MiB/s Receiving objects: 36% (42765/118789), 41.05 MiB | 11.73 MiB/s Receiving objects: 37% (43952/118789), 41.05 MiB | 11.73 MiB/s Receiving objects: 38% (45140/118789), 41.05 MiB | 11.73 MiB/s Receiving objects: 39% (46328/118789), 41.05 MiB | 11.73 MiB/s Receiving objects: 40% (47516/118789), 41.05 MiB | 11.73 MiB/s Receiving objects: 40% (48259/118789), 41.05 MiB | 11.73 MiB/s Receiving objects: 41% (48704/118789), 46.92 MiB | 11.73 MiB/s Receiving objects: 42% (49892/118789), 46.92 MiB | 11.73 MiB/s Receiving objects: 43% (51080/118789), 46.92 MiB | 11.73 MiB/s Receiving objects: 44% (52268/118789), 46.92 MiB | 11.73 MiB/s Receiving objects: 45% (53456/118789), 46.92 MiB | 11.73 MiB/s Receiving objects: 46% (54643/118789), 46.92 MiB | 11.73 MiB/s Receiving objects: 47% (55831/118789), 46.92 MiB | 11.73 MiB/s Receiving objects: 48% (57019/118789), 46.92 MiB | 11.73 MiB/s Receiving objects: 49% (58207/118789), 46.92 MiB | 11.73 MiB/s Receiving objects: 50% (59395/118789), 46.92 MiB | 11.73 MiB/s Receiving objects: 51% (60583/118789), 46.92 MiB | 11.73 MiB/s Receiving objects: 52% (61771/118789), 46.92 MiB | 11.73 MiB/s Receiving objects: 53% (62959/118789), 46.92 MiB | 11.73 MiB/s Receiving objects: 54% (64147/118789), 46.92 MiB | 11.73 MiB/s Receiving objects: 55% (65334/118789), 46.92 MiB | 11.73 MiB/s Receiving objects: 56% (66522/118789), 46.92 MiB | 11.73 MiB/s Receiving objects: 57% (67710/118789), 46.92 MiB | 11.73 MiB/s Receiving objects: 58% (68898/118789), 46.92 MiB | 11.73 MiB/s Receiving objects: 59% (70086/118789), 46.92 MiB | 11.73 MiB/s Receiving objects: 60% (71274/118789), 52.78 MiB | 11.73 MiB/s Receiving objects: 61% (72462/118789), 52.78 MiB | 11.73 MiB/s Receiving objects: 62% (73650/118789), 52.78 MiB | 11.73 MiB/s Receiving objects: 63% (74838/118789), 52.78 MiB | 11.73 MiB/s Receiving objects: 64% (76025/118789), 52.78 MiB | 11.73 MiB/s Receiving objects: 65% (77213/118789), 52.78 MiB | 11.73 MiB/s Receiving objects: 66% (78401/118789), 52.78 MiB | 11.73 MiB/s Receiving objects: 67% (79589/118789), 52.78 MiB | 11.73 MiB/s Receiving objects: 68% (80777/118789), 52.78 MiB | 11.73 MiB/s Receiving objects: 69% (81965/118789), 52.78 MiB | 11.73 MiB/s Receiving objects: 70% (83153/118789), 52.78 MiB | 11.73 MiB/s Receiving objects: 71% (84341/118789), 52.78 MiB | 11.73 MiB/s Receiving objects: 72% (85529/118789), 52.78 MiB | 11.73 MiB/s Receiving objects: 73% (86716/118789), 52.78 MiB | 11.73 MiB/s Receiving objects: 74% (87904/118789), 52.78 MiB | 11.73 MiB/s Receiving objects: 75% (89092/118789), 52.78 MiB | 11.73 MiB/s Receiving objects: 76% (90280/118789), 52.78 MiB | 11.73 MiB/s Receiving objects: 77% (91468/118789), 52.78 MiB | 11.73 MiB/s Receiving objects: 77% (92075/118789), 52.78 MiB | 11.73 MiB/s Receiving objects: 78% (92656/118789), 58.64 MiB | 11.85 MiB/s Receiving objects: 79% (93844/118789), 58.64 MiB | 11.85 MiB/s Receiving objects: 80% (95032/118789), 58.64 MiB | 11.85 MiB/s Receiving objects: 81% (96220/118789), 58.64 MiB | 11.85 MiB/s Receiving objects: 82% (97407/118789), 58.64 MiB | 11.85 MiB/s Receiving objects: 83% (98595/118789), 58.64 MiB | 11.85 MiB/s Receiving objects: 84% (99783/118789), 58.64 MiB | 11.85 MiB/s Receiving objects: 85% (100971/118789), 58.64 MiB | 11.85 MiB/s Receiving objects: 86% (102159/118789), 58.64 MiB | 11.85 MiB/s Receiving objects: 87% (103347/118789), 58.64 MiB | 11.85 MiB/s Receiving objects: 88% (104535/118789), 58.64 MiB | 11.85 MiB/s Receiving objects: 89% (105723/118789), 64.51 MiB | 11.73 MiB/s Receiving objects: 90% (106911/118789), 64.51 MiB | 11.73 MiB/s Receiving objects: 91% (108098/118789), 64.51 MiB | 11.73 MiB/s Receiving objects: 92% (109286/118789), 64.51 MiB | 11.73 MiB/s Receiving objects: 93% (110474/118789), 64.51 MiB | 11.73 MiB/s Receiving objects: 94% (111662/118789), 64.51 MiB | 11.73 MiB/s Receiving objects: 95% (112850/118789), 64.51 MiB | 11.73 MiB/s Receiving objects: 95% (112952/118789), 64.51 MiB | 11.73 MiB/s Receiving objects: 96% (114038/118789), 70.37 MiB | 11.73 MiB/s Receiving objects: 97% (115226/118789), 70.37 MiB | 11.73 MiB/s Receiving objects: 98% (116414/118789), 76.24 MiB | 11.73 MiB/s Receiving objects: 99% (117602/118789), 76.24 MiB | 11.73 MiB/s remote: Total 118789 (delta 16053), reused 22233 (delta 15756), pack-reused 95951 +Receiving objects: 100% (118789/118789), 76.24 MiB | 11.73 MiB/s Receiving objects: 100% (118789/118789), 79.98 MiB | 11.72 MiB/s, done. +Resolving deltas: 0% (0/95865) Resolving deltas: 1% (996/95865) Resolving deltas: 2% (2257/95865) Resolving deltas: 3% (2884/95865) Resolving deltas: 4% (3844/95865) Resolving deltas: 5% (4802/95865) Resolving deltas: 6% (5780/95865) Resolving deltas: 7% (6717/95865) Resolving deltas: 8% (7821/95865) Resolving deltas: 9% (8683/95865) Resolving deltas: 10% (10216/95865) Resolving deltas: 12% (11978/95865) Resolving deltas: 13% (12556/95865) Resolving deltas: 14% (13996/95865) Resolving deltas: 15% (14566/95865) Resolving deltas: 16% (15969/95865) Resolving deltas: 17% (16957/95865) Resolving deltas: 18% (17326/95865) Resolving deltas: 19% (18477/95865) Resolving deltas: 20% (19174/95865) Resolving deltas: 20% (19517/95865) Resolving deltas: 21% (20165/95865) Resolving deltas: 22% (21107/95865) Resolving deltas: 23% (22054/95865) Resolving deltas: 24% (23015/95865) Resolving deltas: 25% (23982/95865) Resolving deltas: 26% (25044/95865) Resolving deltas: 27% (25999/95865) Resolving deltas: 28% (26860/95865) Resolving deltas: 29% (27841/95865) Resolving deltas: 30% (29017/95865) Resolving deltas: 31% (29800/95865) Resolving deltas: 32% (30905/95865) Resolving deltas: 33% (31749/95865) Resolving deltas: 34% (32612/95865) Resolving deltas: 35% (33553/95865) Resolving deltas: 36% (34518/95865) Resolving deltas: 37% (35471/95865) Resolving deltas: 38% (36462/95865) Resolving deltas: 39% (37389/95865) Resolving deltas: 40% (38348/95865) Resolving deltas: 41% (39308/95865) Resolving deltas: 42% (40269/95865) Resolving deltas: 43% (41337/95865) Resolving deltas: 44% (42283/95865) Resolving deltas: 45% (43169/95865) Resolving deltas: 46% (44148/95865) Resolving deltas: 47% (45058/95865) Resolving deltas: 48% (46284/95865) Resolving deltas: 49% (46974/95865) Resolving deltas: 50% (48005/95865) Resolving deltas: 51% (48940/95865) Resolving deltas: 52% (49898/95865) Resolving deltas: 53% (50860/95865) Resolving deltas: 54% (51783/95865) Resolving deltas: 55% (52765/95865) Resolving deltas: 56% (53753/95865) Resolving deltas: 57% (54703/95865) Resolving deltas: 58% (55661/95865) Resolving deltas: 59% (56618/95865) Resolving deltas: 60% (57521/95865) Resolving deltas: 61% (58480/95865) Resolving deltas: 62% (59513/95865) Resolving deltas: 63% (60401/95865) Resolving deltas: 64% (61363/95865) Resolving deltas: 65% (62391/95865) Resolving deltas: 66% (63280/95865) Resolving deltas: 67% (64294/95865) Resolving deltas: 68% (65192/95865) Resolving deltas: 69% (66152/95865) Resolving deltas: 70% (67115/95865) Resolving deltas: 71% (68073/95865) Resolving deltas: 72% (69055/95865) Resolving deltas: 73% (70022/95865) Resolving deltas: 74% (70957/95865) Resolving deltas: 75% (72011/95865) Resolving deltas: 76% (72900/95865) Resolving deltas: 77% (73846/95865) Resolving deltas: 78% (74792/95865) Resolving deltas: 79% (75734/95865) Resolving deltas: 80% (76705/95865) Resolving deltas: 81% (77853/95865) Resolving deltas: 82% (79538/95865) Resolving deltas: 83% (79618/95865) Resolving deltas: 84% (80829/95865) Resolving deltas: 85% (81490/95865) Resolving deltas: 86% (82457/95865) Resolving deltas: 87% (83494/95865) Resolving deltas: 87% (83770/95865) Resolving deltas: 88% (84370/95865) Resolving deltas: 89% (85326/95865) Resolving deltas: 90% (86313/95865) Resolving deltas: 91% (87457/95865) Resolving deltas: 92% (88196/95865) Resolving deltas: 93% (89209/95865) Resolving deltas: 94% (90114/95865) Resolving deltas: 95% (91073/95865) Resolving deltas: 95% (91673/95865) Resolving deltas: 96% (92070/95865) Resolving deltas: 97% (93194/95865) Resolving deltas: 100% (95865/95865) Resolving deltas: 100% (95865/95865), done. +Note: switching to '4.2.0'. + +(truncated...) + +Added ../sdcc/sdcc/4.2.0/bin to PATH +skip@Dell-7040:~/esl/OpenEPaperLink/zbs243_AP_FW$ make +sdcc -c main.c -DAP_FW=1 --code-size 0xfc00 -Isoc/zbs243 -DSOC_ZBS243 --xram-loc 0xe000 --xram-size 0x2000 --model-large -Icpu/8051 -mmcs51 --std-c2x --opt-code-size --peep-file cpu/8051/peep.def --fomit-frame-pointer -Iboard/zbs29_ssd1619 -Isoc/zbs243 -Icpu/8051 -I. -o main.rel + +(truncated...) + +objcopy main.ihx main.bin -I ihex -O binary +skip@Dell-7040:~/esl/OpenEPaperLink/zbs243_AP_FW$ . ../sdcc/unset.sh +skip@Dell-7040:~/esl/OpenEPaperLink/zbs243_AP_FW$ +```` + diff --git a/sdcc/build_sdcc.sh b/sdcc/build_sdcc.sh new file mode 100755 index 00000000..16969b54 --- /dev/null +++ b/sdcc/build_sdcc.sh @@ -0,0 +1,34 @@ +#/bin/sh +# build local version of sdcc 4.2.0 from source + +SDCC_VER=4.2.0 + +if [ ! -e sdcc ]; then + git clone https://github.com/swegener/sdcc.git + if [ $? -ne 0 ]; then + echo "Couldn't clone https://github.com/swegener/sdcc.git" + exit 1 + fi +fi +cd sdcc +git tag 4.2.0 56dc646f8ba6d37c039c5e0c3e60b1340da65b9f +git checkout ${SDCC_VER} +if [ $? -ne 0 ]; then + echo "Couldn't checkout ${SDCC_VER} source from git" + exit 1 +fi + +./configure --prefix=`pwd`/${SDCC_VER} --disable-z80-port --disable-z180-port --disable-r2k-port --disable-r2ka-port --disable-r3ka-port --disable-sm83-port --disable-tlcs90-port --disable-ez80_z80-port --disable-z80n-port --disable-ds390-port --disable-ds400-port --disable-pic14-port --disable-pic16-port --disable-hc08-port --disable-s08-port --disable-stm8-port --disable-pdk13-port --disable-pdk14-port --disable-pdk15-port --disable-pdk16-port --disable-mos6502-port --disable-mos65c02-port 2>&1 | tee build.log +make -j8 2>&1 | tee -a build.log +if [ $? -ne 0 ]; then + echo "sdcc make failed see ./sdcc/build.log for details" + exit 1 +fi + +make -j8 install 2>&1 | tee -a build.log +if [ $? -ne 0 ]; then + echo "sdcc make install failed see ./sdcc/build.log for details" + exit 1 +fi + + diff --git a/sdcc/setup.sh b/sdcc/setup.sh new file mode 100755 index 00000000..922e91a7 --- /dev/null +++ b/sdcc/setup.sh @@ -0,0 +1,26 @@ +#/bin/sh +# set environment variables to use locally built sdcc version 4.2.0 + +#set -x +SDCC_VER=4.2.0 + +if [ "${BASH_SOURCE[0]}" -ef "$0" ]; then + echo "This script must be SOURCED, not run directly (source $0)." + exit 1 +fi + +SDCC_DIR=`dirname ${BASH_SOURCE[0]}` + +if [ ! -e ${SDCC_DIR}/sdcc/${SDCC_VER} ]; then + (cd ${SDCC_DIR};./build_sdcc.sh) +fi + +export CC=sdcc +SDCC_PATH=${SDCC_DIR}/sdcc/${SDCC_VER}/bin +echo $PATH | grep ${SDCC_PATH} > /dev/null +if [ $? -ne 0 ]; then + export SDCC_PATH_SAVE=$PATH + export PATH=${SDCC_PATH}:$PATH + echo "Added ${SDCC_PATH} to PATH" +fi + diff --git a/sdcc/unset.sh b/sdcc/unset.sh new file mode 100755 index 00000000..e7d37aa9 --- /dev/null +++ b/sdcc/unset.sh @@ -0,0 +1,19 @@ +#/bin/sh +# set environment variables to use locally built sdcc version 4.2.0 + +#set -x +SDCC_VER=4.2.0 +if [ "${BASH_SOURCE[0]}" -ef "$0" ]; then + echo "This script must be SOURCED, not run directly (source $0)." + exit 1 +fi + +SDCC_DIR=`dirname ${BASH_SOURCE[0]}` +SDCC_PATH=${SDCC_DIR}/sdcc/${SDCC_VER}/bin +echo $PATH | grep ${SDCC_PATH} > /dev/null +if [ ! "${SDCC_PATH_SAVE}x" = "x" ]; then + export PATH=${SDCC_PATH_SAVE} + export SDCC_PATH_SAVE= + export CC= +fi +