Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
pt:examples:setup:eclipse [2015/12/07 18:47] – Criação deste novo documento. articapt:examples:setup:eclipse [2020/07/20 09:00] (current) – external edit 127.0.0.1
Line 31: Line 31:
  
 **6.** Para testar o correcto funcionamento do Eclipse, o seguinte código fonte pode ser copiado para o ambiente de desenvolvimento e compilado. Para compilar pode-se usar a combinação de teclas de CTRL+B **6.** Para testar o correcto funcionamento do Eclipse, o seguinte código fonte pode ser copiado para o ambiente de desenvolvimento e compilado. Para compilar pode-se usar a combinação de teclas de CTRL+B
- 
- 
-///////CONTINUAR AQUI 
- 
- 
-For testing the correct operation of Eclipse, the following source code can copied to environment and compiled. For compilation the keyboard combination of CTRL + B can be used. 
  
 <code c> <code c>
Line 64: Line 58:
 </code> </code>
  
-For successful compilation, the code is needed to be error free and the compilator must be able to find all necessary header filesA successful compilation is indicated in //Problem// window as emptiness (or at outermost cases some warnings //Warning//and in //Console// window as the output of compilator which will for example be in this case:+Para uma compilação com sucesso é necessário que o código não tenha erros e que o compilador encontre todos os ficheiros de cabeçalho necessáriosUma compilação com sucesso é indicada na janela //Problem// como vazio (ou em alguns casos alguns erros //Warning//e na janela //Console// como output do compilador que por exemplo neste caso seria:
  
   AVR Memory Usage   AVR Memory Usage
Line 77: Line 71:
 {{:software:eclipse:eclipse7.jpg?520|}} {{:software:eclipse:eclipse7.jpg?520|}}
  
-If the code has errors or header files are not foundthen the //Console// window displays the number of errors on end line and describes possible faults above it.+Se o código tiver erros ou os ficheiros de cabeçalho não forem encontradosentão na janela //Console// será indicado o número de erros e descritas as possivéis falhas em cima.
  
   ../main.c: In function 'main':   ../main.c: In function 'main':
Line 84: Line 78:
   make: *** [main.o] Error 1   make: *** [main.o] Error 1
  
-Alsothe  //Problems// window displays several error messages and corresponding location in code is marked with error icon.+Também a janela //Problems// indica várias mensagens de erro e correspondente localização no código marcado com icon de erro.
  
 {{:software:eclipse:eclipse8.jpg?520|}} {{:software:eclipse:eclipse8.jpg?520|}}
  
-**7.** For using HomeLab libraryit is assumed to be correctly installed into operation system with the help of instructionFor every project the library must be included into list of linkable objects in project optionsTo do thisopen at first: //Project -> Properties// and then from leftside tree //C/C++ Build -> Settings//, further //Tool Settings -> AVR C linker -> Libraries//Choose in window that opened in the right under //Libraries (-l)// icon //Add...// and input to the dialog box "homelab2561"Then //OK// and one more //OK//.+**7.** Para utilizar a biblioteca HomeLab, é assumida a correcta instalação no sistema operativo seguindo as instruções indicadasPara cada projecto a biblioteca tem de ser incluida na lista de objectos linkáveis nas opções de projectoPara fazer issoabrir primeiro: //Project -> Properties// e depois na àrvore do lado esquerdo //C/C++ Build -> Settings//, //Tool Settings -> AVR C linker -> Libraries//Seleccionar na janela que apareceu na direita debaixo de //Libraries (-l)// o icone //Add...// e insira na caixa de diálogo "homelab2561"Depois prima //OK// e novamente //OK//.
  
 {{:software:eclipse:eclipse10.jpg?520|}} {{:software:eclipse:eclipse10.jpg?520|}}
  
-**8.** For testing HomeLab library the following source code can be used when copied besids the previous code and compiledYou can again use CTRL + B combination on keyboard+**8.** Para testar a biblioteca HomeLab pode ser utilizado o seguinte código fonte, quando copiado junto do código prévio e compiladoNovamente, pode utilizar a combinação de teclas CTRL+B.
  
 <code c> <code c>
Line 114: Line 108:
 </code> </code>
  
-If compilation of this code is also successfulthe development environment was set up correctly.+Se a compilação deste código também ocorrer com sucessoo ambiente de desenvolvimento foi configurado correctamente.
  
-~~PB~~+<pagebreak>
  
-===== Loading the code into microcontroller =====+===== Carregar código para o microcontrolador =====
  
-**1.** Connect the microcontroller board to PC using USB cableAfter successful connection a small green LED labeled as PWR will light up (after some time on first connection).+**1.** Conectar a placa do microcontrolandor ao PC utilizando um cabo USB. Depois da ligação estabelecida deverá acender um pequeno LED verde com a etiqueta de PWR (depois de algum tempo na primeira ligação).
  
-**2.** Set options for program loader (AVRDude). For this again open project properties //Project -> Properties// and from leftside tree //AVR -> AVRDude//, further //Programmer configuration -> New//The dialog box that now opens needs no changes and you can press //OK// buttonIf it is selected press //Apply// and then //OK//.+**2.** Configurar opções do programa loader (AVRDude). Para isto abra novamente as opções do projecto //Project -> Properties// e na àrvore da esquerda selecione //AVR -> AVRDude//, depois //Programmer configuration -> New//A caixa de diálogo que abre não necessita alterações, basta premir //OK//Se estiver selecionado prima //Apply// e depois //OK//.
  
 {{:software:eclipse:eclipse9.jpg?520|}} {{:software:eclipse:eclipse9.jpg?520|}}
  
-It is important to check that in list //Programmer configuration// something can be choosed and by default this will be: //New Configuration//.+É importante verificar que na lista //Programmer configuration// algo pode ser selecionado e por defeito será: //New Configuration//.
  
 {{:software:eclipse:eclipse11.jpg?520|}} {{:software:eclipse:eclipse11.jpg?520|}}
  
  
-**3.** If HomeLab microcontroller module is connected with PC, you can now try to load the compiled program into microcontrollerFor this simply press AVR icon or use CTRL + ALT + U in keyboard+**3.** Se o módulo de microcontrolador HomeLab estiver ligado ao PC, poderá agora tentar carregar o programa compilado para o microcontroladorPara tal simplesmente prima o icon AVR ou use o atalho CTRL + ALT + U no teclado
-  + 
-As an effect of this programthe on-board LED (PB7) should start flashingIf the program worksyou have successfully set up your programming environment and completed your first programCongratulations+Como efeito deste programao LED on-board (PB7) deverá começar a piscarSe o programa funcionardeverá ter agora completado com sucesso o seu primeiro programa no ambiente de desenvolvimento. 
 +Parabéns!
  
 {{:kit:kit_2561_test.jpg?400|}} {{:kit:kit_2561_test.jpg?400|}}
  
-===== Using floating-point variables =====+===== Usando variáveis de virgula fluctuante =====
  
-It is sometimes necessary in AVR programs to use floating-point variables. For calculating with them and presenting with //printf//-type functionsthe following changes are necessary in the configuration of the project:+Por vezes é necessário utilizar em programas AVR variáveis de virgula fluctuante. Para utilizar em cálculos e apresentá-los com funções do tipo //printf//, para tal serão necessárias fazer as seguintes alterações nas configurações do projecto:
  
-**1.** Open the configuration of the project from the menu //File → Properties//On the leftside panel open //AVR C Linker → Libraries//, where in addition to HomeLab library other library objects must be included //printf_flt// and //m// (libprintf_flt.a ja libm.a).+**1.** Abrir as configurações do projecto no menu //File → Properties//No painel da esquerda abrir //AVR C Linker → Libraries//, onde adicionalmente à biblioteca do HomeLab outros objectos da biblioteca necessiram ser incluiros //printf_flt// //m// (libprintf_flt.a ja libm.a).
  
-**2.** Then open //AVR C Linker → General// and into box of //Other Arguments// add line //-uvfprintf//.+**2.** Depois abrir //AVR C Linker → General// e na caixa de //Other Arguments// adicionar a linha //-uvfprintf//.
  
 {{:examples:eclipse:eclipse_floating_point_libraries.png?520|}} {{:examples:eclipse:eclipse_floating_point_libraries.png?520|}}
Line 149: Line 144:
 {{:examples:eclipse:eclipse_floating_point_printf.png?520|}} {{:examples:eclipse:eclipse_floating_point_printf.png?520|}}
  
-**3.** Press OK and close configuration window.+**3.** Premir OK e fechar a janela de configurações.
pt/examples/setup/eclipse.1449514024.txt.gz · Last modified: 2020/07/20 09:00 (external edit)
CC Attribution-Share Alike 4.0 International
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0