реклама на сайте
подробности

 
 
> СodeVision, как отключить инициализацию
valera_o
сообщение Oct 14 2009, 12:26
Сообщение #1


Участник
*

Группа: Участник
Сообщений: 46
Регистрация: 2-04-08
Пользователь №: 36 402



При компиляции файла проги, помимо кода, который написан в основном окне, в asm файле появляются макросы инициализации ОЗУ и другие. Как избавиться от этой инициализации, съедается место и по включению, хоть и небольшая, но есть задержка?
Go to the top of the page
 
+Quote Post
 
Start new topic
Ответов
oll
сообщение Oct 15 2009, 18:19
Сообщение #2


Частый гость
**

Группа: Участник
Сообщений: 163
Регистрация: 10-10-05
Пользователь №: 9 463



In every program the CodeVisionAVR C compiler automatically generates a code sequence to make the following initializations immediately after the AVR chip reset:
1. interrupt vector jump table
2. global interrupt disable
3. EEPROM access disable
4. Watchdog Timer disable
5. external RAM access and wait state enable if necessary
6. clear registers R2 … R14
7. clear the RAM
8. initialize the global variables located in RAM
9. initialize the Data Stack Pointer register Y
10. initialize the Stack Pointer register SP
11. initialize the UBRR register if necessary

The automatic generation of code sequences 2 to 8 can be disabled by checking the Use an External Startup Initialization File check box in the Project|Configure|C Compiler|Code Generation dialog window. The C compiler will then include, in the generated .asm file, the code sequences from an external file that must be named STARTUP.ASM . This file must be located in the directory where your main C source file resides.
You can write your own STARTUP.ASM file to customize or add some features to your program. The code sequences from this file will be immediately executed after the chip reset.
A basic STARTUP.ASM file is supplied with the compiler distribution and is located in the C:\cvavr2\bin\

Сообщение отредактировал oll - Oct 15 2009, 18:21
Go to the top of the page
 
+Quote Post
IgorKossak
сообщение Oct 16 2009, 07:37
Сообщение #3


Шаман
******

Группа: Модераторы
Сообщений: 3 064
Регистрация: 30-06-04
Из: Киев, Украина
Пользователь №: 221



Цитата(oll @ Oct 15 2009, 21:19) *
7. clear the RAM

Вот за такие выходки я и ненавижу некоторых производителей тулчейнов, грубо попирающих стандарты.
Go to the top of the page
 
+Quote Post

Сообщений в этой теме


Reply to this topicStart new topic
2 чел. читают эту тему (гостей: 2, скрытых пользователей: 0)
Пользователей: 0

 


RSS Текстовая версия Сейчас: 19th July 2025 - 02:52
Рейтинг@Mail.ru


Страница сгенерированна за 0.01386 секунд с 7
ELECTRONIX ©2004-2016