|
From: | Bruce D. Lightner |
Subject: | Re: [avr-gcc-list] avr-gcc ABI: return 8-bit value from function |
Date: | Tue, 5 Jun 2018 07:33:16 -0700 |
User-agent: | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 |
Benoit,
See "C WITHOUT RAM" section of this 2006 article named "Tiny AVR Serial Port Programmer". http://www.lightner.net/avr/2605018Lightner.pdf ...and this Webpage... http://www.lightner.net/avr/ATtinyAvrGcc.html Compiling C-code for an AVR like the ATtiny2313 with few resources---and zero SRAM---is indeed practical. But today STMicro sells tiny 32-bit STM32 ARM microcontroller chips (e.g., STM32L021D4P7, 5mm x 6mm TSSOP-14) with plenty of program flash and SRAM for under $1 US. STM even claims "32-bits for 32-cents" in large volumes for their ARM Cortex chips. https://www.electronicspecifier.com/micros/stm32f030-stm32-stmicroelectronics-value-line-microcontrollers-32-bits-for-32-cents Best regards, Bruce On 6/4/2018 7:35 PM, Erik Christiansen wrote: Reply-To: address@hidden On 04.06.18 19:19, Benoit Steinmetz wrote:p.s: I have recently started a topic on avrfreaks about this issue [2].Your link has caused me to visit avrfreaks for the second time in a decade, leading me to wonder if answers would appear here. Normally I'd point to the useful software admonition "Be conservative in what you output, and liberal in tolerance of input.", but I see that your target is an ATtiny2313. With only 1K instructions available, I'm surprised to see any 'C' used at all, and understand the desire to trim every superfluous instruction. One question: Does the omission of sign extension by avr-gcc remain without optimisation for size? My current project, also on an ATtiny2313, is 100% assembler - simplified event scheduler, state machines, HAL, the lot. But at least you could fall back to an ATtiny4313 if the 'C' blows out, I guess. Erik _______________________________________________ AVR-GCC-list mailing list address@hidden https://lists.nongnu.org/mailman/listinfo/avr-gcc-list --
Bruce D. Lightner Lightner Engineering 8551 La Jolla Shores Drive La Jolla, California 92037-3044 Mobile/SMS: +1-858-228-7579 Voice: +1-858-551-0770 ext. 2 Email: address@hidden URL: http://www.lightner.net/lightner/bruce/ CONFIDENTIALITY NOTICE: This e-mail and any attachments may contain confidential information intended solely for the use of the addressee. If the reader of this message is not the intended recipient, any distribution, copying, or use of this e-mail or its attachments is prohibited. If you received this message in error, please notify the sender immediately by e-mail and delete this message and any copies. Thank you. |
[Prev in Thread] | Current Thread | [Next in Thread] |