AKB Forums

Go Back   AKB Forums > Technical sections > Languages, Compilers and Interpreters
Home Register Blogs FAQ Members List Calendar Downloads Arcade Mark Forums Read

Languages, Compilers and Interpreters C,C++,C#,.NET,Java,PHP,Perl,SQL and more

Troubles when posting message? Click here! :: Проблемы с отправлением сообщения? Нажмите сюда!

Reply
 
LinkBack Thread Tools Display Modes
Old Aug 11, 2004, 07:42   #1
Младенец
 
Join Date: Jun 2004
Location: Moscow
Posts: 39
Rep Power: 0
Reputation: 10
CCS2.2 compiliruet coshmarnyh cod!!!

Ya probuyu napisat' boot loader s flasha.
Vsyo by nichego no mne nuzhno pomestitsya v 1 KB. S drugoi storony ne xochetsya na assemblere i vot nikak ni poymu pochemu stack ne popodaet tuda kuda nado.

-stack 0x400
MEMORY {
BOOT : origin = 0x0000, len = 0x00600
ISRAM : origin = 0x0600, len = 0x1000
ISRAMSTACK : origin = 0x1600, len = 0x2000
SDRAM : origin = 0x80000000, len = 0x2000000

}

SECTIONS {
.vectors {} > BOOT
.const: {} > BOOT
.text: {} > BOOT
.bss: {} > ISRAM
.stack: {} > ISRAMSTACK
.far: {} > ISRAM
.sysdata: {} > ISRAM
.sysregs: {} > ISRAM
.sysinit: {} > ISRAM
.cinit: {} > ISRAM
.data: {} > ISRAM
}

vot cmd file. Etogo ne dostatochno shtoby stack pri compilyacii popal po naznachennomu adresu? Ne obrashayte vnimaniya shto seciya stecka bol'she razmerov real'nogo stecka... eto prosto straxovka na budushee.

Last edited by veg : Aug 11, 2004 at 08:03.
veg is offline   Reply With Quote Quote selected
Old Aug 11, 2004, 13:14   #2
Младенец
 
Join Date: Aug 2004
Location: Yerevan
Posts: 3
Rep Power: 0
Reputation: 10
A kuda popal posle kompiljacii stack ?

Etogo .cmd fajla dostatochno, chtoby sekcija .stack popala tuda, kuda nado. Eshchje nuzhno inicializirovat' SP (t.e. B15), no eto dolzhen avtomaticheski sdelat' c_int00.
bars is offline   Reply With Quote Quote selected
Old Aug 11, 2004, 14:17   #3
Младенец
 
Join Date: Jun 2004
Location: Moscow
Posts: 39
Rep Power: 0
Reputation: 10
Ya rabotayu bez RTSliba i _c_int00 prosto pered mainom pastavlen. Stack voobshe ne inicializiruetsya. Te privyazyvayetsa k B15 i beret znacheniye kakoye tam est'.
veg is offline   Reply With Quote Quote selected
Old Aug 11, 2004, 14:25   #4
Младенец
 
Join Date: Aug 2004
Location: Yerevan
Posts: 3
Rep Power: 0
Reputation: 10
Togda neponimaju, o chem vopros. Inicializiruj B15 i budesh' imet' stack tam, gde xochesh'.
bars is offline   Reply With Quote Quote selected
Old Aug 11, 2004, 15:07   #5
Младенец
 
Join Date: Jun 2004
Location: Moscow
Posts: 39
Rep Power: 0
Reputation: 10
OK Ya tak i delayu esli chestno.
No ya xotel programmu napisat' v C bez assemblera. A shtoby u etogo registra pomenyat' adres prixoditsa asmovski kusochek tuda zapyxnut'.
No ya nachinayu ponimat' shto bez RTS liba na C pisat' nel'zya, navernoye
veg is offline   Reply With Quote Quote selected
Old Aug 12, 2004, 05:27   #6
Младенец
 
Join Date: Aug 2004
Location: Yerevan
Posts: 3
Rep Power: 0
Reputation: 10
Po moemu chto-to vrode

asm(" mvk 0x2000, B15");
asm(" b _main");
asm(" nop 5");

ne tak uzh i slozhno ;-)

Last edited by bars : Aug 12, 2004 at 10:03.
bars is offline   Reply With Quote Quote selected
Old Aug 12, 2004, 13:14   #7
Младенец
 
Join Date: Jun 2004
Location: Moscow
Posts: 39
Rep Power: 0
Reputation: 10
Spasibo
Ya eto tak i sdelal. No xotelos' shtoby comiler dislociroval
Anyway 10x
veg is offline   Reply With Quote Quote selected
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 00:36.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
This board was founded on September 29, 2001
Powered by Viper Internet

Affordable Web Hosting | ParevNet

Buy text link