Replace bare int types with stdint types. This was done with:
grep -rwl 'int' src/ | xargs sed -i 's/\<int\>/int16_t/g'
grep -rwl 'unsigned long' src/ | xargs sed -i 's/\<unsigned long\>/uint32_t/g'
grep -rwl 'unsigned char' src/ | xargs sed -i 's/\<unsigned char\>/uint8_t/g'
Then reverted for *main(), putchar(), and getchar().
The Arduino declarations for parallel_main() were also corrected to
match their definitions.
SDCC does *not* generate the same code in all instances, due to `int`
being treated different than `short int`.
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Use u8 instead of i16 as a delay can never be negative and should never
block for a long period of time.
Use a decrementing loop as SDCC generates more efficient code.
Signed-off-by: Tim Crawford <tcrawford@system76.com>
ROMs produced of Pop!_OS 20.10 and Fedora 33 with SDCC 4.0.0 cause
uecflash to crash after verifying the block write, leaving the system
unbootable until all power is removed to force an EC reset.
Sorting object files appears to resolve this issue, creates a smaller
binary (~200 bytes from 20.04), and gives up more reproducible builds.
The ITE EC hardware always has the first 32KB of ram mapped, while
a second 32KB of ram is banked immediately after. By default, the
banked physical address immediately follows the fixed area in flash.
* Add addw2 board
* Set charge params and update gpio.h
* Set VGA fan to 100% when entering scratch rom
* Implement keyboard LEDs
* Turn off keyboard LEDs in gpio defaults
* Default airplane mode LED to off
* Enable GPU power and fan control
* Add NVIDIA GPU power and temp to power.csv
* Add NVIDIA GPU fan value to power.sh
* Move GPU init back to coreboot
* Do not turn on GPU fan if GPU is off
* Show POST codes
* Add timestamps to console_external
* Accept port 81 cycles
* Move setting RSTS into ec_init
* Move post code debugging to system76/common
* Move some GPIO init from system76/common to boards
* Make some power signals optional
* Remove POST code support - it only works on IT5570