Jump to content

    
SAVC

Не видит метки

Recommended Posts

Определение

.equ buff_half = (32+1)*4

.dseg
.org INTERNAL_SRAM_START
    
buff0:
	.byte buff_half*2 ;264
buff1:
	.byte buff_half*2 ;264
buff_num:
	.byte 1
	
.cseg

.org 0
	rjmp start

.org TCA0_OVF_vect / 2
	rjmp tca0_int

Использование

tca0_5:
	inc r23
	andi r23,1
	brne tca0_3
	inc r22
	cpi r22,buff_half
	brne tca0_3
	
	or r21,r21
	breq tca0_3
	ldi r21,0
	lds r25,buff_num
	or r25,r25
	brne tca0_4
	ldi zl,low(buff0)
	ldi zh,high(buff0)
	ldi r25,0
	sts buff_num,r25
	reti
tca0_4:
	ldi zl,low(buff1)
	ldi zh,high(buff1)
	ldi r25,1
	sts buff_num,r25
tca0_3:	
	reti

Вывод:

make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
make[1]: Entering directory 'E:/Andrey/__DSRT/AVR LDS v1.0 REMAKE/avr-lds-v1.1.X'
make  -f nbproject/Makefile-default.mk dist/default/production/avr-lds-v1.1.X.production.obj
make[2]: Entering directory 'E:/Andrey/__DSRT/AVR LDS v1.0 REMAKE/avr-lds-v1.1.X'
"C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avrassembler\avrasm2.exe"  -fI -W+ie -I "C:/Program Files (x86)/Microchip/MPLABX/v5.40/packs/Microchip/ATmega_DFP/2.2.108/avrasm/inc"  -i m809def.inc -d dist/default/production/avr-lds-v1.1.X.production.obj  -S dist/default/production/avr-lds-v1.1.X.production.tmp  -o dist/default/production/avr-lds-v1.1.X.production.hex  -m dist/default/production/avr-lds-v1.1.X.production.map  -l dist/default/production/avr-lds-v1.1.X.production.lss main.asm
"C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avrassembler\avrasm2.exe"  -fI -W+ie -I "C:/Program Files (x86)/Microchip/MPLABX/v5.40/packs/Microchip/ATmega_DFP/2.2.108/avrasm/inc"  -i m809def.inc -d dist/default/production/avr-lds-v1.1.X.production.obj  -S dist/default/production/avr-lds-v1.1.X.production.tmp  -o dist/default/production/avr-lds-v1.1.X.production.hex  -m dist/default/production/avr-lds-v1.1.X.production.map  -l dist/default/production/avr-lds-v1.1.X.production.lss tca0_int.asm
"C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avrassembler\avrasm2.exe"  -fI -W+ie -I "C:/Program Files (x86)/Microchip/MPLABX/v5.40/packs/Microchip/ATmega_DFP/2.2.108/avrasm/inc"  -i m809def.inc -d dist/default/production/avr-lds-v1.1.X.production.obj  -S dist/default/production/avr-lds-v1.1.X.production.tmp  -o dist/default/production/avr-lds-v1.1.X.production.hex  -m dist/default/production/avr-lds-v1.1.X.production.map  -l dist/default/production/avr-lds-v1.1.X.production.lss make_app.asm
AVRASM: AVR macro assembler 2.2.7 (buildA VRASM: AVR 69m aJcurlo 26 201 7 16a:s25s:06)
Copyrightembler  2.2.7 ((buiCld ) 1995-206917  ATMEL JCul 26 2o0r1p7 or1ation

6:25:06)
Copyright (C) 1995-2017 ATMEL Corporation

[builtin](2): Inclu[builtin](2): Including file d'iC:ng/ fPriole g'rC:/am Files (x8P6)/Mrogriacrochimp F/iMPLABXl/es (x8v65.4)0/p/acMiks/cMicrrocohcip/hMiPpL/ABAXT/mv5e.g40/pa_DFP/acks2/Mi.2c.10r8och/iapvr/aATmsemg/ai_nDcF\m809def.inc'
P/2.2.108/avrasm/inc\m809def.inc'
C:/Program Files (x86)/Microchip/MPLABX/v5.40/packs/MicrCochi:p//PArTomgega_DrFP/2.2a.108/avmr Faislme/inc\m809desf .(ixn8c6()/3M8): wicarrochnip/MPLABX/vin5g.4: 0U/pnreaccokgsn/ized corMei vercrochision: V4p/
ATmeg[builta_iDFPn/2](.2.108/av2r):a sm/inc\im809def.inc(3n8f): warnino:g :' CU:n/recognPized corrograem Files (x 86)/Microchip/MPLABXve/v5.r40si/packon: V4
s/Microchip/ATmega_DFP/2.2.108/avrasm/inc\m809def[.buinc' included firom lhere
tmakie_app.asm(0): info: '[builtin]' included from here
n](2): info: 'C:/Program Files (x86)/Microchip/MPLABX/v5.40/packs/Microchip/ATmega_DFP/2.2.108/avrasm/inc\m809def.inc' included from here
tca0_int.asm(0): info: '[builtin]' included from here
C:/Program Files (x86)/Microchip/MPLABX/v5.40/packs/Microchip/ATmega_DFP/2.2.108/avrasm/inc\m809def.inc(38): warning: Unrecognized core version: V4
[builtin](2): info: 'C:/Program Files (x86)/Microchip/MPLABX/v5.40/packs/Microchip/ATmega_DFP/2.2.108/avrasm/inc\m809def.inc' included from here
main.asm(0): info: '[builtin]' included from here
C:/Program Files (x86)/Microchip/MPLABX/v5.40/packs/Microchip/ATmega_DFP/2.2.108/avrasm/inc\m809def.inc(38): warning: Unrecognized core version: V4
[builtin](2): info: 'C:/Program Files (x86)/Microchip/MPLABX/v5.40/packs/Microchip/ATmega_DFP/2.2.108/avrasm/inc\m809def.inc' included from here
tca0_int.asm(0): info: '[builtin]' included from here
C:/Program Files (x86)/Microchip/MPLABX/v5.40/packs/Microchip/ATmega_DFP/2.2.108/avrasm/inc\m809def.inc(38): warning: Unrecognized core version: V4
[builtin](2): info: 'C:/Program Files (x86)/Microchip/MPLABX/v5.40/packs/Microchip/ATmega_DFP/2.2.108/avrasm/inc\m809def.inc' included from here
make_app.asm(0): info: '[builtin]' included from here
C:/Program Files (x86)/Microchip/MPLABX/v5.40/packs/Microchip/ATmega_DFP/2.2.108/avrasm/inc\m809def.inc(38): warning: Unrecognized core version: V4
[builtin](2): info: 'C:/Program Files (x86)/Microchip/MPLABX/v5.40/packs/Microchip/ATmega_DFP/2.2.108/avrasm/inc\m809def.inc' included from here
main.asm(0): info: '[builtin]' included from here
AVRASM: AVR macro assembler 2.2.7 (build 69 Jul 26 2017 16:25:06)
Copyright (C) 1995-2017 ATMEL Corporation

[builtin](2): Including file 'C:/Program Files (x86)/Microchip/MPLABX/v5.40/packs/Microchip/ATmega_DFP/2.2.108/avrasm/inc\m809def.inc'
[builtin](2): Including file 'C:/Program Files (x86)/Microchip/MPLABX/v5.40/packs/Microchip/ATmega_DFP/2.2.108/avrasm/inc\m809def.inc'
[builtin](2): Including file 'C:/Program Files (x86)/Microchip/MPLABX/v5.40/packs/Microchip/ATmega_DFP/2.2.108/avrasm/inc\m809def.inc'
main.asm(63): Including file 'tca0_int.asm'
[builtin](2): Including file 'C:/Program Files (x86)/Microchip/MPLABX/v5.40/packs/Microchip/ATmega_DFP/2.2.108/avrasm/inc\m809def.inc'
main.asm(63): Including file 'tca0_int.asm'
tca0_int.asm(281): error: Undefined symbol: buff_half
tca0_int.asm(287): error: Undefined symbol: buff_num
tca0_int.asm(290): error: Undefined symbol: buff0
tca0_int.asm(291): error: Undefined symbol: buff0
tca0_int.asm(293): error: Undefined symbol: buff_num
tca0_int.asm(296): error: Undefined symbol: buff1
tca0_int.asm(297): error: Undefined symbol: buff1
tca0_int.asm(299): error: Undefined symbol: buff_num

Assembly failed, 8 errors, 2 warnings

Assembly complete, 0 errors. 2 warnings
make[2]: *** [build/default/production/tca0_int.obj] Error 1
make[2]: *** Waiting for unfinished jobs....

"ATmega809" memory use summary [bytes]:
Segment   Begin    End      Code   Data   Used    Size   Use%
---------------------------------------------------------------
[.cseg] 0x000000 0x000004      0      4      4    8192   0.0%
[.dseg] 0x003c00 0x003c01      0      1      1    1024   0.1%
[.eseg] 0x000000 0x000000      0      0      0     256   0.0%
nbproject/Makefile-default.mk:116: recipe for target 'build/default/production/tca0_int.obj' failed

"ATmega809" memory use summary [bytes]:
Segment   Begin    End      Code   Data   Used    Size   Use%
---------------------------------------------------------------
[.cseg] 0x000000 0x000220    532      0    532    8192   6.5%
[.dseg] 0x003c00 0x003e11      0    529    529    1024  51.7%
[.eseg] 0x000000 0x000000      0      0      0     256   0.0%

Assembly complete, 0 errors. 2 warnings
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
make[2]: Leaving directory 'E:/Andrey/__DSRT/AVR LDS v1.0 REMAKE/avr-lds-v1.1.X'
nbproject/Makefile-default.mk:94: recipe for target '.build-conf' failed
make[1]: Leaving directory 'E:/Andrey/__DSRT/AVR LDS v1.0 REMAKE/avr-lds-v1.1.X'
nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed

BUILD FAILED (exit value 2, total time: 813ms)

Почему?

Share this post


Link to post
Share on other sites

А Atmel Studio компилирует!

------ Build started: Project: AssemblerApplication1, Configuration: Debug AVR ------
Build started.
Project "AssemblerApplication1.asmproj" (default targets):
Target "PreBuildEvent" skipped, due to false condition; ('$(PreBuildEvent)'!='') was evaluated as (''!='').
Target "CoreBuild" in file "C:\Program Files (x86)\Atmel\Studio\7.0\Vs\Assembler.targets" from project "E:\Andrey\__DSRT\AVR LDS v1.0 REMAKE\1\AssemblerApplication1\AssemblerApplication1\AssemblerApplication1.asmproj" (target "Build" depends on it):
	Task "RunAssemblerTask"
		C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avrassembler\avrasm2.exe -fI -o "AssemblerApplication1.hex"  -m "AssemblerApplication1.map"  -l "AssemblerApplication1.lss"  -S "AssemblerApplication1.tmp"  -W+ie -I"C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.3.300\avrasm\inc"  -im809def.inc -d "E:\Andrey\__DSRT\AVR LDS v1.0 REMAKE\1\AssemblerApplication1\AssemblerApplication1\Debug\AssemblerApplication1.obj"  "E:\Andrey\__DSRT\AVR LDS v1.0 REMAKE\1\AssemblerApplication1\AssemblerApplication1\main.asm"  -I "C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avrassembler\Include" 
		AVRASM: AVR macro assembler 2.2.7 (build 69 Jul 26 2017 16:25:06)
		Copyright (C) 1995-2017 ATMEL Corporation
		[builtin](2): Including file 'C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.3.300\avrasm\inc\m809def.inc'
		E:\Andrey\__DSRT\AVR LDS v1.0 REMAKE\1\AssemblerApplication1\AssemblerApplication1\main.asm(65): Including file 'E:\Andrey\__DSRT\AVR LDS v1.0 REMAKE\1\AssemblerApplication1\AssemblerApplication1\tca0_int.asm'
		[builtin](2): Including file 'C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.3.300\avrasm\inc\m809def.inc'
		E:\Andrey\__DSRT\AVR LDS v1.0 REMAKE\1\AssemblerApplication1\AssemblerApplication1\main.asm(65): Including file 'E:\Andrey\__DSRT\AVR LDS v1.0 REMAKE\1\AssemblerApplication1\AssemblerApplication1\tca0_int.asm'
		"ATmega809" memory use summary [bytes]:
		Segment   Begin    End      Code   Data   Used    Size   Use%
		---------------------------------------------------------------
		[.cseg] 0x000000 0x000216    530      0    530    8192   6.5%
		[.dseg] 0x003c00 0x003e11      0    529    529    1024  51.7%
		[.eseg] 0x000000 0x000000      0      0      0     256   0.0%
		Assembly complete, 0 errors. 0 warnings
	Done executing task "RunAssemblerTask".
Done building target "CoreBuild" in project "AssemblerApplication1.asmproj".
Target "PostBuildEvent" skipped, due to false condition; ('$(PostBuildEvent)' != '') was evaluated as ('' != '').
Target "Build" in file "C:\Program Files (x86)\Atmel\Studio\7.0\Vs\Avr.common.targets" from project "E:\Andrey\__DSRT\AVR LDS v1.0 REMAKE\1\AssemblerApplication1\AssemblerApplication1\AssemblerApplication1.asmproj" (entry point):
Done building target "Build" in project "AssemblerApplication1.asmproj".
Done building project "AssemblerApplication1.asmproj".

Build succeeded.
========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==========

 

Share this post


Link to post
Share on other sites
42 минуты назад, zombi сказал:

Неужели нельзя сформулировать вопрос более лаконично?

Зато вопрос лаконичен

12 часов назад, SAVC сказал:

Почему?

Потому что неверно. Вот же ошибку пишет:

tca0_int.asm(281): error: Undefined symbol: buff_half

Share this post


Link to post
Share on other sites
15 minutes ago, HardEgor said:

Вот же ошибку пишет:


tca0_int.asm(281): error: Undefined symbol: buff_half

Так вопрошающий как раз таки и интересуется почему оно эту ошибку пишет...

Share this post


Link to post
Share on other sites
28 минут назад, zombi сказал:

Так вопрошающий как раз таки и интересуется почему оно эту ошибку пишет...

А причем здесь метки в названии темы?

Если бы он прочитал лог и подумал, то понял бы, что компилятор не видит объявления buff_half и дальше всё сломалось.

Синтаксисы разные у компиляторов или ключи или еще чего. Сравнить портянки текста и сам автор сможет.

Share this post


Link to post
Share on other sites
Только что, zombi сказал:

Возможно потому-что автор не понимает разницу между меткой и директивой.

Ну так голова у него есть, зачем запускать что-то если не понимаешь зачем?

Уже всё давно есть и на русском, хоть чуть-чуть подготовься, почитай, а потом задавай адекватный вопрос.

Share this post


Link to post
Share on other sites

Просто MPLAB глючит. До введения метки buff_half требовалось поднять описание сегмента dseg в начало исходника, чтобы всё работало, а после введения метки buff_half, вообще всё сломалось.

Вопрос, возможно, неадекватный, каюсь, но писать больше не было сил. Или приводить ВЕСЬ исходник - тоже не вариант, да и кто их читать то будет.

Автор понимает разницу между меткой и директивой, в директиве .equ объявляется метка buff_half.

Ещё раз повотряю, при переносе в Atmel Studio, всё заработало, и даже описание dseg удалось переместить в конец исходника main, как я люблю. :-)

А был ещё такой прикол, двойное определение метки buff_half.

Если поставить во вложенный исходник, в котором она и используется, директиву .equ buff_half, то компиляция начинает работать, точнее, ошибка с buff_half исчезает, остальные остаются.

Share this post


Link to post
Share on other sites
16 minutes ago, SAVC said:

Автор понимает разницу между меткой и директивой, в директиве .equ объявляется метка buff_half.

Неа, не понимает. Никакая метка в .EQU не объявляется.

По поводу "простыней", попробуйте изучить "Spoiler".

Весь текст в нем будет скрыт.

Любой участник, имеющий непреодолимое желание Вам помочь, развернёт его. А Ваш пост будет выглядеть аккуратно.

Share this post


Link to post
Share on other sites
3 minutes ago, zombi said:

Никакая метка в .EQU не объявляется.

Ладно, не объявляется. Я все числовые значения называю метками. Это не правильно.

Так что, zombi, вы предлагаете постить ВЕСЬ исходник? Под спойлером?

Share this post


Link to post
Share on other sites
42 minutes ago, SAVC said:

Я все числовые значения называю метками.

У метки в результате компиляции будет адрес. У константы buff_half адрес будет?

44 minutes ago, SAVC said:

Так что, zombi, вы предлагаете постить ВЕСЬ исходник? Под спойлером?

Ну да.

Share this post


Link to post
Share on other sites

Адрес - это просто число. У buff_half тоже будет число.

Ну ладно, вот рабочий код.

Файл main.asm

Spoiler

.cseg

.org 0
	rjmp start

.org TCA0_OVF_vect
	rjmp tca0_int


start:
	ldi r16,LOW(INTERNAL_SRAM_END)
	ldi r17,HIGH(INTERNAL_SRAM_END)
	sts CPU_SPH,r17
	sts CPU_SPL,r16

	ldi r16,1
	sts TCA0_SINGLE_CTRLA,r16
	ldi r16,1
	sts TCA0_SINGLE_INTCTRL,r16
	ldi r16,LOW(256)
	ldi r17,HIGH(256)
	sts TCA0_SINGLE_TEMP,r16
	sts TCA0_SINGLE_PER+1,r17

	ldi xl,LOW(INTERNAL_SRAM_START)
	ldi xh,HIGH(INTERNAL_SRAM_START)
	ldi r17,LOW(INTERNAL_SRAM_SIZE)
	ldi r18,HIGH(INTERNAL_SRAM_SIZE)
	ldi r16,0
st01:
	st X+,r16
	dec r17
	brne st01
	dec r18
	brne st01

	ldi zl,low(buff0)
	ldi zh,high(buff0)
	
	ldi r16,255
	out VPORTC_DIR,r16
	out VPORTD_DIR,r16
	
	sei

main_cycle:
mc0:
	rjmp mc0	

tca0_int:
	.include "tca0_int.asm"
	
make_app:
	.include "make_app.asm"

.equ buff_half = (32+1)*4

.dseg
.org INTERNAL_SRAM_START
    
buff0:
	.byte buff_half*2 ;264
buff1:
	.byte buff_half*2 ;264
buff_num:
	.byte 1

 

Файл tca0_int.asm

Spoiler


	
   	ldi r25,1
	sts TCA0_SINGLE_INTFLAGS,r25

	inc r24
	andi r24,1
	brne tca0_1
	rjmp tca0_2
	
tca0_1:
	nop
    
	ld r25,Z+
	out VPORTC_OUT,r25
	nop
	
	ld r25,Z+
	out VPORTC_OUT,r25
	nop
	
	ld r25,Z+
	out VPORTC_OUT,r25
	nop
	
	ld r25,Z+
	out VPORTC_OUT,r25
	nop
	
	ld r25,Z+
	out VPORTC_OUT,r25
	nop
	
	ld r25,Z+
	out VPORTC_OUT,r25
	nop
	
	ld r25,Z+
	out VPORTC_OUT,r25
	nop
	
	ld r25,Z+
	out VPORTC_OUT,r25
	nop
	
	ld r25,Z+
	out VPORTC_OUT,r25
	nop
	
	ld r25,Z+
	out VPORTC_OUT,r25
	nop
	
	ld r25,Z+
	out VPORTC_OUT,r25
	nop
	
	ld r25,Z+
	out VPORTC_OUT,r25
	nop
	
	ld r25,Z+
	out VPORTC_OUT,r25
	nop
	
	ld r25,Z+
	out VPORTC_OUT,r25
	nop
	
	ld r25,Z+
	out VPORTC_OUT,r25
	nop
	
	ld r25,Z+
	out VPORTC_OUT,r25
	nop
	
	ld r25,Z+
	out VPORTC_OUT,r25
	nop
	
	ld r25,Z+
	out VPORTC_OUT,r25
	nop
	
	ld r25,Z+
	out VPORTC_OUT,r25
	nop
	
	ld r25,Z+
	out VPORTC_OUT,r25
	nop
	
	ld r25,Z+
	out VPORTC_OUT,r25
	nop
	
	ld r25,Z+
	out VPORTC_OUT,r25
	nop
	
	ld r25,Z+
	out VPORTC_OUT,r25
	nop
	
	ld r25,Z+
	out VPORTC_OUT,r25
	nop
	
	ld r25,Z+
	out VPORTC_OUT,r25
	nop
	
	ld r25,Z+
	out VPORTC_OUT,r25
	nop
	
	ld r25,Z+
	out VPORTC_OUT,r25
	nop
	
	ld r25,Z+
	out VPORTC_OUT,r25
	nop
	
	ld r25,Z+
	out VPORTC_OUT,r25
	nop
	
	ld r25,Z+
	out VPORTC_OUT,r25
	nop
	
	ld r25,Z+
	out VPORTC_OUT,r25
	nop
	
	ld r25,Z+
	out VPORTC_OUT,r25
	nop
	
	ldi r25,0
	out VPORTC_OUT,r25
	nop
	nop
	
	ld r25,Z+
	out VPORTD_OUT,r25

	rjmp tca0_5

tca0_2:
	ld r25,Z+
	out VPORTD_OUT,r25
	nop
	
	ld r25,Z+
	out VPORTD_OUT,r25
	nop
	
	ld r25,Z+
	out VPORTD_OUT,r25
	nop
	
	ld r25,Z+
	out VPORTD_OUT,r25
	nop
	
	ld r25,Z+
	out VPORTD_OUT,r25
	nop
	
	ld r25,Z+
	out VPORTD_OUT,r25
	nop
	
	ld r25,Z+
	out VPORTD_OUT,r25
	nop
	
	ld r25,Z+
	out VPORTD_OUT,r25
	nop
	
	ld r25,Z+
	out VPORTD_OUT,r25
	nop
	
	ld r25,Z+
	out VPORTD_OUT,r25
	nop
	
	ld r25,Z+
	out VPORTD_OUT,r25
	nop
	
	ld r25,Z+
	out VPORTD_OUT,r25
	nop
	
	ld r25,Z+
	out VPORTD_OUT,r25
	nop
	
	ld r25,Z+
	out VPORTD_OUT,r25
	nop
	
	ld r25,Z+
	out VPORTD_OUT,r25
	nop

	ld r25,Z+
	out VPORTD_OUT,r25
	nop
	
	ld r25,Z+
	out VPORTD_OUT,r25
	nop
	
	ld r25,Z+
	out VPORTD_OUT,r25
	nop
	
	ld r25,Z+
	out VPORTD_OUT,r25
	nop
	
	ld r25,Z+
	out VPORTD_OUT,r25
	nop
	
	ld r25,Z+
	out VPORTD_OUT,r25
	nop
	
	ld r25,Z+
	out VPORTD_OUT,r25
	nop
	
	ld r25,Z+
	out VPORTD_OUT,r25
	nop
	
	ld r25,Z+
	out VPORTD_OUT,r25
	nop
	
	ld r25,Z+
	out VPORTD_OUT,r25
	nop
	
	ld r25,Z+
	out VPORTD_OUT,r25
	nop
	
	ld r25,Z+
	out VPORTD_OUT,r25
	nop
	
	ld r25,Z+
	out VPORTD_OUT,r25
	nop
	
	ld r25,Z+
	out VPORTD_OUT,r25
	nop

	ldi r25,0
	out VPORTD_OUT,r25
	nop
	nop
	
	ld r25,Z+
	out VPORTC_OUT,r25
		
tca0_5:
	or r24,r24
	brne tca0_3
	inc r23
	cpi r23,buff_half
	brne tca0_3
	
	or r22,r22
	breq tca0_3
	ldi r22,0
	lds r25,buff_num
	or r25,r25
	brne tca0_4
	ldi zl,low(buff0)
	ldi zh,high(buff0)
	ldi r25,0
	sts buff_num,r25
	reti
tca0_4:
	ldi zl,low(buff1)
	ldi zh,high(buff1)
	ldi r25,1
	sts buff_num,r25
tca0_3:	
	reti

 

Файл make_app.asm

Spoiler

.cseg
    
    
chanks:
    .db 0b1000000,0b10100000,0b11100000,0b11110000

.dseg
cur_chank:  .byte 1

 

 

Вывод Atmel Studio

Spoiler

------ Build started: Project: AssemblerApplication1, Configuration: Debug AVR ------
Build started.
Project "AssemblerApplication1.asmproj" (default targets):
Target "PreBuildEvent" skipped, due to false condition; ('$(PreBuildEvent)'!='') was evaluated as (''!='').
Target "CoreBuild" in file "C:\Program Files (x86)\Atmel\Studio\7.0\Vs\Assembler.targets" from project "E:\Andrey\__DSRT\AVR LDS v1.0 REMAKE\1\AssemblerApplication1\AssemblerApplication1\AssemblerApplication1.asmproj" (target "Build" depends on it):
	Using "RunAssemblerTask" task from assembly "C:\Program Files (x86)\Atmel\Studio\7.0\Extensions\Application\AvrAssembler.dll".
	Task "RunAssemblerTask"
		C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avrassembler\avrasm2.exe -fI -o "AssemblerApplication1.hex"  -m "AssemblerApplication1.map"  -l "AssemblerApplication1.lss"  -S "AssemblerApplication1.tmp"  -W+ie -I"C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.3.300\avrasm\inc"  -im809def.inc -d "E:\Andrey\__DSRT\AVR LDS v1.0 REMAKE\1\AssemblerApplication1\AssemblerApplication1\Debug\AssemblerApplication1.obj"  "E:\Andrey\__DSRT\AVR LDS v1.0 REMAKE\1\AssemblerApplication1\AssemblerApplication1\main.asm"  -I "C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avrassembler\Include" 
		AVRASM: AVR macro assembler 2.2.7 (build 69 Jul 26 2017 16:25:06)
		Copyright (C) 1995-2017 ATMEL Corporation
		[builtin](2): Including file 'C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.3.300\avrasm\inc\m809def.inc'
		E:\Andrey\__DSRT\AVR LDS v1.0 REMAKE\1\AssemblerApplication1\AssemblerApplication1\main.asm(53): Including file 'E:\Andrey\__DSRT\AVR LDS v1.0 REMAKE\1\AssemblerApplication1\AssemblerApplication1\tca0_int.asm'
		E:\Andrey\__DSRT\AVR LDS v1.0 REMAKE\1\AssemblerApplication1\AssemblerApplication1\main.asm(56): Including file 'E:\Andrey\__DSRT\AVR LDS v1.0 REMAKE\1\AssemblerApplication1\AssemblerApplication1\make_app.asm'
		[builtin](2): Including file 'C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.3.300\avrasm\inc\m809def.inc'
		E:\Andrey\__DSRT\AVR LDS v1.0 REMAKE\1\AssemblerApplication1\AssemblerApplication1\main.asm(53): Including file 'E:\Andrey\__DSRT\AVR LDS v1.0 REMAKE\1\AssemblerApplication1\AssemblerApplication1\tca0_int.asm'
		E:\Andrey\__DSRT\AVR LDS v1.0 REMAKE\1\AssemblerApplication1\AssemblerApplication1\main.asm(56): Including file 'E:\Andrey\__DSRT\AVR LDS v1.0 REMAKE\1\AssemblerApplication1\AssemblerApplication1\make_app.asm'
		"ATmega809" memory use summary [bytes]:
		Segment   Begin    End      Code   Data   Used    Size   Use%
		---------------------------------------------------------------
		[.cseg] 0x000000 0x000222    530      4    534    8192   6.5%
		[.dseg] 0x003c00 0x003e11      0    530    530    1024  51.8%
		[.eseg] 0x000000 0x000000      0      0      0     256   0.0%
		Assembly complete, 0 errors. 0 warnings
	Done executing task "RunAssemblerTask".
Done building target "CoreBuild" in project "AssemblerApplication1.asmproj".
Target "PostBuildEvent" skipped, due to false condition; ('$(PostBuildEvent)' != '') was evaluated as ('' != '').
Target "Build" in file "C:\Program Files (x86)\Atmel\Studio\7.0\Vs\Avr.common.targets" from project "E:\Andrey\__DSRT\AVR LDS v1.0 REMAKE\1\AssemblerApplication1\AssemblerApplication1\AssemblerApplication1.asmproj" (entry point):
Done building target "Build" in project "AssemblerApplication1.asmproj".
Done building project "AssemblerApplication1.asmproj".

Build succeeded.
========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==========

 

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.