View previous topic :: View next topic |
Author |
Message |
Jeje
Joined: 09 May 2005 Posts: 5 Location: Germany
|
Posted: Mon May 09, 2005 1:25 pm Post subject: Problems compiling "Test_DOS_Drive.bas" |
|
|
Hi,
I want to use a MMC for data logging in a setup with a ATMega128 and AVR-DOS. I downloaded the newest Files from http://members.aon.at/voegel/ and put the Libs in my Bascom Library Path and the Config Files in my Working Directory.
I changed "Test_DOS_Drive.bas" to include the MMC instead of CF Config-File and commented out the FS_Interpreter. After that the file won't compile anymore.
Test_DOS_Drive.bas:
Code: | $regfile = "M128def.dat"
$crystal = 16000000
' Adjust HW Stack, Soft-Stack and Frame size to 128 minimum each!!!
$baud = 9600
Open "Com1:" As Binary As #1 ' use #1 for fs_interpreter
Config Clock = Soft
Enable Interrupts
Config Date = Mdy , Separator = .
Dim Btemp1 As Byte
Print #1 , "Wait for Drive"
' Include here you driver for Compactflash/HardDisk or other
$Include "Config_MMC.bas" ' Does drive init too
If Gbdriveerror = 0 Then
' Include AVR-DOS Configuration and library
$Include "Config_AVR-DOS.BAS"
Print #1 , "Init File System ... ";
Btemp1 = Initfilesystem(1) ' Partition 1
' use 0 for drive without Master boot record
If Btemp1 <> 0 Then
Print #1 , "Error: " ; Btemp1 ; " at Init file system"
Else
Print #1 , " OK"
Print #1 , "Filesystem: " ; Gbfilesystem
Print #1 , "FAT Start Sector: " ; Glfatfirstsector
Print #1 , "Root Start Sector: " ; Glrootfirstsector
Print #1 , "Data First Sector: " ; Gldatafirstsector
Print #1 , "Max. Cluster Nummber: " ; Gwmaxclusternumber
Print #1 , "Sectors per Cluster: " ; Gbsectorspercluster
Print #1 , "Root Entries: " ; Gwrootentries
Print #1 , "Sectors per FAT: " ; Gwsectorsperfat
Print #1 , "Number of FATs: " ; Gbnumberoffats
End If
Else
Print #1 , "Error during Drive Init: " ; Gbdriveerror
End If
' If you want to test with File-System Interpreter uncomment next line
'$Include "FS_Interpreter.bas" |
I get the following errors (only if the line including the FS_Interpreter is commented out):
Error : 61 Line : 47 Label not found [_SEND_COMMAND_MMC ] , in File : X:\PROJECTS\REFR\SRC\TEST_DOS_DRIVE.BAS
Error : 61 Line : 47 Label not found [_BYTE2SPI_255 ] , in File : X:\PROJECTS\REFR\SRC\TEST_DOS_DRIVE.BAS
Error : 61 Line : 47 Label not found [_BYTE2SPI_255 ] , in File : X:\PROJECTS\REFR\SRC\TEST_DOS_DRIVE.BAS
Error : 61 Line : 47 Label not found [_BYTE2SPI_255 ] , in File : X:\PROJECTS\REFR\SRC\TEST_DOS_DRIVE.BAS
Error : 61 Line : 47 Label not found [_BYTE2SPI_255 ] , in File : X:\PROJECTS\REFR\SRC\TEST_DOS_DRIVE.BAS
Error : 61 Line : 47 Label not found [_BYTE2SPI_255 ] , in File : X:\PROJECTS\REFR\SRC\TEST_DOS_DRIVE.BAS
Any help highly appreciated,
Daniel. |
|
Back to top |
|
|
oe9vfj
Joined: 17 Jun 2004 Posts: 269 Location: Austria, Hard
|
Posted: Mon May 09, 2005 2:46 pm Post subject: |
|
|
Hi,
This happens, if you don't use any statement, which uses Drive reading or writing functions, cause of a missing $EXTERNAL in the DriverInit routine.
With any AVR-DOS function in your code (for example uncomment FS_Interpreter.bas) this should not occur.
Next release of the MMC-Driver will compile without any problem. _________________ regards Josef
DOS - File System for BASCOM-AVR on http://members.aon.at/voegel |
|
Back to top |
|
|
Jeje
Joined: 09 May 2005 Posts: 5 Location: Germany
|
Posted: Wed May 11, 2005 8:27 am Post subject: Problems compiling "Test_DOS_Drive.bas" |
|
|
Ok, compiles fine now, excellent.
Thanks a lot!
Daniel. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|
|