Hi, I use pcb-rnd. Now, I need to move my projects from gschem (can't build it on ubuntu 20.04) to xschem. I've compiled xschem and it is ok. How can I convert my *.sym from gschem to xschem? Or I have to do all my *.sym for xschem from the start? Thanks!
Very thank you for your help!
Hi, This is a code sample: #define USART1_CR5 *((unsigned char *)0x5238) #define USART_CR5_HDSEL ((unsigned char)0x08) inline void usart_sethalfduplex(){ register unsigned char lb; lb = USART1_CR5; //set half duplex mode lb|=USART_CR5_HDSEL; USART1_CR5 = lb; } void main() { usart_sethalfduplex(); } And a result for SDCC : stm8 3.7.1 #10451 (Linux): sdcc --opt-code-size --std-c99 --all-callee-saves --nolospre -lstm8 -mstm8 --out-fmt-elf --debug --verbose --stack-auto --fverbose-asm --float-reent --no-peep...
Hi, This is a code sample: #define USART1_CR5 *((unsigned char *)0x5238) #define USART_CR5_HDSEL ((unsigned char)0x08) inline void usart_sethalfduplex(){ register unsigned char lb; lb = USART1_CR5; //set half duplex mode lb|=USART_CR5_HDSEL; USART1_CR5 = lb; } void main() { usart_sethalfduplex(); } And a result: sdcc --opt-code-size --std-c99 --all-callee-saves --nolospre -lstm8 -mstm8 --out-fmt-elf --debug --verbose --stack-auto --fverbose-asm --float-reent --no-peep usart.c sdcc: Calling preprocessor......
Hi, This is a code sample: #define USART1_CR5 *((unsigned char *)0x5238) #define USART_CR5_HDSEL ((unsigned char)0x08) inline void usart_sethalfduplex(){ register unsigned char lb; lb = USART1_CR5; //set half duplex mode lb|=USART_CR5_HDSEL; USART1_CR5 = lb; } void main() { usart_sethalfduplex(); } And a result: sdcc --opt-code-size --std-c99 --all-callee-saves --nolospre -lstm8 -mstm8 --out-fmt-elf --debug --verbose --stack-auto --fverbose-asm --float-reent --no-peep usart.c sdcc: Calling preprocessor......
"Unexpected DIV/DIVW instruction result in ISR" in the STM8 errata Thank you very much! Now, will try to search errata before asking. And what is about piece with push a and pop a ? P.S. I have read a method to loose unused code for pic14 from [https://sourceforge.net/p/sdcc/mailman/message/34776699/]. Then I've tried to modify stm8 .asm files and added .area f_N before each function. I've got no errors about such approach. But there are no command-line options for sdldstm8 to optimize (loose) unused...
"Unexpected DIV/DIVW instruction result in ISR" in the STM8 errata Thank you very much! Now, will try to search errata before asking. And what is about piese with push a and pop a ? P.S. I have read a method to loose unused code for pic14 from [https://sourceforge.net/p/sdcc/mailman/message/34776699/]. Then I've tried to modify stm8 .asm files and added .area f_N before each function. I've got no errors about such approach. But there are no command-line options for sdldstm8 to optimize (loose) unused...
Hi, I have compiled last SDCC : stm8 3.7.1 #10443 (Linux). Here are my a test.c file and makefile. test.c : #include "stdint.h" #define PA_ODR *(unsigned char *)(0x5000) #define PA_DDR *(unsigned char *)(0x5002) #define PA_CR1 *(unsigned char *)(0x5003) #define pinled 5 #define pinled_init() PA_DDR|=pinled;PA_CR1|=pinled #define pinled_xor() PA_ODR^=pinled; #define TIM4_ISR 25 static void tim4_isr() __interrupt(TIM4_ISR) { __asm__("bres 0x5344, #0"); // TIM4_SR &= ~(1 << TIM4_SR_UIF) } static void...