For the "pdkuino.h" does it means that we can program pdk like an Arduino, or even make an Arduino core based on it?
Well, we are pretty far away from that right now.
The biggest obstacle is that Arduino technically uses a C++ compiler, but SDCC is only a C compiler. These PDK devices weren't even really designed with C in mind, let alone C++. It is unlikely there will ever be a C++ compiler, or that it would be worth using if there was one.
Also, the limited RAM and program (CODE) size means we have to be much more frugal with how we write code and how libraries are written and used. A 'simple' thing like printf (ok, not that simple in reality) can already consume more resources than a lot of these devices have.
But, we can make the environment feel a little more at home for those already versed in Arduino. We can introduce helper macros and libraries that make interfacing with pins and peripherals and external devices look a bit more like Arduino code. The pdkarduino.h include file in my repo really just introduces setup() and loop() methods so you don't have to manually create them (SDCC, like all C compilers just gives a main() method). And I have a util.h file that helps us to write code a little more like with Arduino.
So, we can write things like:
#define PIN_LED PA,4
...
setPinOutput(PIN_LED);
setPinHigh(PIN_LED);
Instead of something like this:
PAC &= ~(1<<4)
PA |= (1<<4)
There are readability and portability improvements by using something like the first more Arduino like example (although I understand not everyone prefers that syntax).
There is also a possibility to integrate the toolchain into the Arduino IDE (although, IMO there are much better IDEs out there). I ran across this the other day, which accomplishes an SDCC toolchain available to import into the Arduino IDE:
https://github.com/DeqingSun/ch55xduinoThere is still a lot of work to make the software libraries and example programs as clean and easy to use as Arduino provides, but hopefully we can at least start to bridge that gap.