I have attached an LED blink program that I wrote for an STM8S microcontroller. It contains an expression which is evaluated at compile time:
ldw y, #(F_CPU / 20200 / 3)
F_CPU is 16_000_000. This expression should evaluate to 264. Which it does while building on a windows host. But when I'm building on a linux host (specifically arch linux), I noticed that it is evaluating to 0x14CD (which I noticed from the .lst file).
Again, it works correctly on windows, the error comes only while building on linux (arch linux).
PFA
.s, .lst, .rel files
Here is my host environment:
OS: Arch linux
SDCC version: 4.5.0
Target device: STM8S103
Thanks