인라인 어셈블러를 사용중 오류 메시지 Og005 및 Og006

기술노트 31237

아키텍처:

ARM, AVR, AVR32

컴포넌트:

compiler

업데이트:

2018-02-28 오전 1:47

Introduction

When compiling a project the following messages might appear:

Error[Og005]: Unknown symbol in inline assembly:
Error[Og006]: Syntax error in inline assembly: "Error[54]: Expression can not be forward"

Solution

Labels must be referred in the same assembler statement as they are declared. Use multiline inline assembler (with row breaks \n) to solve this.

Example:

asm("st      -Y,  R20\n  \n"
"spmloop: \n"
"lN R20, 0x37 \n"
"SBRC R20, 0 \n"
"RJMP spmloop \n"
"OUT 0x37,R25 \n"
"SPM \n"
"LD R20,Y+ \n");

The behavior was not correct in earlier versions of the compiler platform. The new release uses a new internal compiler platform which is a bit more strict.


All product names are trademarks or registered trademarks of their respective owners.

죄송하지만, 당사 사이트에서는 Internet Explorer를 지원하지 않습니다.보다 편안한 사이트를 위해 Chrome, Edge, Firefox 등과 같은 최신 브라우저를 사용해 주시길 부탁드립니다.