I tried the "first project" and got :
0 340 File 'C:\Users\Public\Documents\Mikroelektronika\mikroPascal PRO for ARM\Uses\ST M4\__Lib_SoftUART.mpas' not found
0 340 File 'C:\Users\Public\Documents\Mikroelektronika\mikroPascal PRO for ARM\Uses\ST M4\__Lib_Sound.mpas' not found
The files 'C:\Users\Public\Documents\Mikroelektronika\mikroPascal PRO for ARM\Uses\ST M4\__Lib_Sound.EMCL' and __Lib_SoftUART.EMCL are present in the folder.
First project
- Aleksandar.Mitrovic
- mikroElektronika team
- Posts: 1697
- Joined: 11 Mar 2015 12:48
Re: First project
Hi Nebulix,
As the name "first project" whether it referred to Led Blinking example?
Can you please send me your project in small zipped form how could I will be able to reproduce the problem.
Also which development system and microcontroller do you use for your example?
Best regards,
Aleksandar
As the name "first project" whether it referred to Led Blinking example?
Can you please send me your project in small zipped form how could I will be able to reproduce the problem.
Also which development system and microcontroller do you use for your example?
Best regards,
Aleksandar
Re: First project
I am trying to operate a STM32F407VG-discovery board. Without any success so far !
I tried the 'first project' but could not even build it because of missing files in the library. I do not understand why I should need a sound library for this project but I did not find where they were evoqued and how to exclude them. Also these files are present in emcl format but not in mpas. Is there a way to convert ?
I also noticed that the software did not detect the mcu. How Should I do ?
Thanks
Gilbert
I tried the 'first project' but could not even build it because of missing files in the library. I do not understand why I should need a sound library for this project but I did not find where they were evoqued and how to exclude them. Also these files are present in emcl format but not in mpas. Is there a way to convert ?
I also noticed that the software did not detect the mcu. How Should I do ?
Thanks
Gilbert
- Attachments
-
- mikrop1.JPG (155.49 KiB) Viewed 4333 times
Re: First project
I reloaded the example from the downloaded library and it builds correctly. Sorry.
But the board is still not founs.
But the board is still not founs.
- Aleksandar.Mitrovic
- mikroElektronika team
- Posts: 1697
- Joined: 11 Mar 2015 12:48
Re: First project
Hi,
Did you program your Discovery board before?
Can you please check jumpers on you Discovery board for programming?
Best regards,
Aleksandar
Did you program your Discovery board before?
Can you please check jumpers on you Discovery board for programming?
Best regards,
Aleksandar
Re: First project
I just plugged both USB connectors and observed blinking leds and the demo accelerometer program.
Jumpers JP1, JP2, JP3 and both ST-LINK are on (connected).
Thanks again
Jumpers JP1, JP2, JP3 and both ST-LINK are on (connected).
Thanks again
- Aleksandar.Mitrovic
- mikroElektronika team
- Posts: 1697
- Joined: 11 Mar 2015 12:48
Re: First project
Hi,
I'm afraid that I didn't understand you completely.
Can you confirm that you solve your problem and that you manage to program your Discovery board?
Best regards,
Aleksandar
I'm afraid that I didn't understand you completely.
Can you confirm that you solve your problem and that you manage to program your Discovery board?
Best regards,
Aleksandar
Re: First project
I can build a project and generate a .hex file.
I cannot upload it to the board.
I cannot upload it to the board.
- Aleksandar.Mitrovic
- mikroElektronika team
- Posts: 1697
- Joined: 11 Mar 2015 12:48
Re: First project
Hi,
Which operating system do you use?
Can you tell me do you use on board programmer or some other?
Also I suggest you to attach some picture of the board connected to PC.
I can suggest you couple solutions that you can try first:
1. Download latest drivers for your system from ST web site
2. Run mikroProg Suite as administrator
3. Also in mikroProg Suite go to Options-->Hardware: STLink must be check if you are using him (see the picture attached below)
Best regards,
Aleksandar
Which operating system do you use?
Can you tell me do you use on board programmer or some other?
Also I suggest you to attach some picture of the board connected to PC.
I can suggest you couple solutions that you can try first:
1. Download latest drivers for your system from ST web site
2. Run mikroProg Suite as administrator
3. Also in mikroProg Suite go to Options-->Hardware: STLink must be check if you are using him (see the picture attached below)
Best regards,
Aleksandar
Re: First project
Hi
I purchased a mini-m4 board. I succeded in compiling the ledblinking program, uploading it and running it. I even modified the blinking rate. Then I tried a more useful program with two functions :
Reading an analog signal at PA3 and outputting a function of it at PA4
Reading a digital signal at PB0 and outputting its inverse at PC0
I mostly pasted parts from examples but nothing works. I probably missed some point, but which ?
Thank you
program MyProject4;
{ Declarations section }
var value : word;
var conf1 : dword;
var conf2 : dword;
var STAT_LED : sbit at ODR13_GPIOC_ODR_bit;
var DATA_LED : sbit at ODR12_GPIOC_ODR_bit;
begin
{ Main program }
GPIO_Digital_Input(@GPIob_BASE, _GPIO_PINMASK_all );
GPIO_Digital_Output(@GPIOc_base, _GPIO_PINMASK_ALL); // Set PORTc as output
GPIO_Clk_Enable(@GPIOb_BASE);// is this necessary ?
GPIO_Clk_Enable(@GPIOC_BASE);
GPIO_Clk_Enable(@GPIOA_BASE);
DAC1_Init(_DAC_CH1_ENABLE or _DAC_CH2_ENABLE);
ADC_Set_Input_Channel(_ADC_CHANNEL_3); // Choose ADC channel (does it correspond to port PA3 ?)
ADC1_Init(); // Init adcX_init x=0,1
Delay_ms(100);
value := 0;
conf1 := _DAC_12_BIT or _DAC_TRIGGER_SW or _DAC_RIGHT_ALIGN;
conf2 := _DAC_12_BIT or _DAC_TRIGGER_SW or _DAC_RIGHT_ALIGN;
while TRUE do
begin
GPIOc_ODR := not(GPIOb_IDR); //is it possible to address individual bits ?
STAT_LED :=not STAT_LED; //for test
value := ADC1_Get_Sample(3); // Get ADC value from corresponding channel
//Delay_ms(20);
DAC1_Advanced_Ch1_Output(4095-value, conf1);
end;
end.
I purchased a mini-m4 board. I succeded in compiling the ledblinking program, uploading it and running it. I even modified the blinking rate. Then I tried a more useful program with two functions :
Reading an analog signal at PA3 and outputting a function of it at PA4
Reading a digital signal at PB0 and outputting its inverse at PC0
I mostly pasted parts from examples but nothing works. I probably missed some point, but which ?
Thank you
program MyProject4;
{ Declarations section }
var value : word;
var conf1 : dword;
var conf2 : dword;
var STAT_LED : sbit at ODR13_GPIOC_ODR_bit;
var DATA_LED : sbit at ODR12_GPIOC_ODR_bit;
begin
{ Main program }
GPIO_Digital_Input(@GPIob_BASE, _GPIO_PINMASK_all );
GPIO_Digital_Output(@GPIOc_base, _GPIO_PINMASK_ALL); // Set PORTc as output
GPIO_Clk_Enable(@GPIOb_BASE);// is this necessary ?
GPIO_Clk_Enable(@GPIOC_BASE);
GPIO_Clk_Enable(@GPIOA_BASE);
DAC1_Init(_DAC_CH1_ENABLE or _DAC_CH2_ENABLE);
ADC_Set_Input_Channel(_ADC_CHANNEL_3); // Choose ADC channel (does it correspond to port PA3 ?)
ADC1_Init(); // Init adcX_init x=0,1
Delay_ms(100);
value := 0;
conf1 := _DAC_12_BIT or _DAC_TRIGGER_SW or _DAC_RIGHT_ALIGN;
conf2 := _DAC_12_BIT or _DAC_TRIGGER_SW or _DAC_RIGHT_ALIGN;
while TRUE do
begin
GPIOc_ODR := not(GPIOb_IDR); //is it possible to address individual bits ?
STAT_LED :=not STAT_LED; //for test
value := ADC1_Get_Sample(3); // Get ADC value from corresponding channel
//Delay_ms(20);
DAC1_Advanced_Ch1_Output(4095-value, conf1);
end;
end.
Re: First project
Well, I had it working ...
In View > Project settings, the clock frequency was set to 16 MHz. By setting it to 120 (as in the ledblinking) or 168, it works !!!
Can anyone explain ?
In View > Project settings, the clock frequency was set to 16 MHz. By setting it to 120 (as in the ledblinking) or 168, it works !!!
Can anyone explain ?
- Aleksandar.Mitrovic
- mikroElektronika team
- Posts: 1697
- Joined: 11 Mar 2015 12:48
Re: First project
Hi,
I'm glad that you find solution to your problem.
16MHz is to low for ARM microcontroller to operate with all functions.
Best regards,
Aleksandar
I'm glad that you find solution to your problem.
16MHz is to low for ARM microcontroller to operate with all functions.
Best regards,
Aleksandar