Skip to content

Compiling for Standalone AVR broken in 0.10.2 #1964

Closed

Description

@timfoden

When I compile a simple Hello World example for an embedded AVR (standalone) the compile fails with a type mismatch error in system.nim (299, 46).

This can be reproduced on Windows using the following source files:

U:>type hello.nim

echo "Hello, World!"

U:>type panicoverride.nim

proc printf(frmt: cstring) {.varargs, importc, header: "<stdio.h>", cdecl.}
proc exit(code: int) {.importc, header: "<stdlib.h>", cdecl.}

{.push stack_trace: off, profiler:off.}

proc rawoutput(s: string) =
  printf("%s\n", s)

proc panic(s: string) =
  rawoutput(s)
  exit(1)

{.pop.}

U:>nim --version
Nim Compiler Version 0.10.2 (2014-12-30) [Windows: i386]
Copyright (c) 2006-2014 by Andreas Rumpf

U:>nim c -c --cpu:avr --os:standalone --deadCodeElim:on hello.nim
c:\dev\nim\config\nim.cfg(45, 2) Hint: added path: 'C:\Users\dwfntfoden.babel\p
kgs' [Path]
c:\dev\nim\config\nim.cfg(46, 2) Hint: added path: 'C:\Users\dwfntfoden.nimble
pkgs' [Path]
Hint: used config file 'c:\dev\Nim\config\nim.cfg' [Conf]
Hint: system [Processing]
c:\dev\nim\lib\system.nim(299, 46) Error: type mismatch

Activity

  1. Araq commented on Jan 18, 2015

    @Araq
    Member

    Who said 'echo' works for os:standalone?

  2. added a commit that references this issue on Jan 18, 2015
    be1441a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions