Creating a microcontroller startup file

Artur Skawina via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Apr 9 03:47:29 PDT 2015


On 04/08/15 18:10, Jens Bauer via Digitalmars-d-learn wrote:
> On Wednesday, 8 April 2015 at 11:17:12 UTC, Mike wrote:
>> On Tuesday, 7 April 2015 at 20:33:26 UTC, Jens Bauer wrote:
>>
>> enum weak = gcc.attribute.attribute("weak");
>> enum isrDefault = gcc.attribute.attribute("alias", "defaultHandler");
>>
>> extern @weak @isrDefault void NMI_Handler();
>> extern @weak @isrDefault void HardFault_Handler();
> 
> This is indeed helpful. I've now reduced each of the approximately 100 lines declaring exception vectors to something like these:
> 
> @weak @ar void Reset_Handler();
> @weak @ae void NMI_Handler();
> 
> -It would be neat, if @attribute("weak") and @attribute("alias","function") could be combined into one, but I haven't found a way to do that 

http://forum.dlang.org/post/mailman.2672.1403379235.2907.digitalmars-d@puremagic.com

artur


More information about the Digitalmars-d-learn mailing list