none
How can I compile and debug the src code in the visual studio? RRS feed

  • Question

  • Hello there,

    I have three questions,hope for your helpful reply.

    (1) I am trying to extract the input data value of baseband in 802.11a(info->scrambled), how can I do it in the realtime communication? I has known that the print functions cannot work in the kennel mode. So is there any method to do this? 

    (2) After extracting the input data value of baseband, I wanna simulate the baseband process in the visual studio, how can I debug the srouce code in the visual studio in the realtime communication or offline test?

    (3) I notice that the machine will be slow down when the modified softWifi driver are loaded, Why it happened? For example, I add the print function in the kennel mode, the machine will be slow down. Can you tell me the reason?

    I am new user of Sora station, even your single short comment will be grateful and helpful to me,Thank you in advance.

    Tuesday, December 20, 2011 8:44 AM

Answers

  • Hello there,

    I have three questions,hope for your helpful reply.

    (1) I am trying to extract the input data value of baseband in 802.11a(info->scrambled), how can I do it in the realtime communication? I has known that the print functions cannot work in the kennel mode. So is there any method to do this?

     

    Do you mean the array BB11A_TX_VECTOR::bFrameScrambled? First I suggest you try complete your task in offline (using demod11.exe). If you really want to do in realtime, you can try:

    a. Kernel: sends a message to the kernel debugger: for example KdPrint

    b. Kernel: write to a file: for example ZwCreateFile

    c. User mode extension(UMX): break into debugger and check

     

    (2) After extracting the input data value of baseband, I wanna simulate the baseband process in the visual studio, how can I debug the srouce code in the visual studio in the realtime communication or offline test?

     

    If you choose offline test binary "demod11.exe", you can attach your debugger (Visual Studio or WinDbg) to the process, or just add "__asm int 3;" in source code to invoke debugger.

    If you try realtime test, you can see item c in above answer.

    (3) I notice that the machine will be slow down when the modified softWifi driver are loaded, Why it happened? For example, I add the print function in the kennel mode, the machine will be slow down. Can you tell me the reason?

     

    I don not exactly understand your modification. If you just add kernel debug output (KdPrint?), and if the output is quite frequent, of course it will slow down.

     

    I am new user of Sora station, even your single short comment will be grateful and helpful to me,Thank you in advance.


    • Marked as answer by Qi LuoEditor Thursday, December 29, 2011 7:07 AM
    Monday, December 26, 2011 11:53 AM
    Answerer

All replies

  • Hello there,

    I have three questions,hope for your helpful reply.

    (1) I am trying to extract the input data value of baseband in 802.11a(info->scrambled), how can I do it in the realtime communication? I has known that the print functions cannot work in the kennel mode. So is there any method to do this?

     

    Do you mean the array BB11A_TX_VECTOR::bFrameScrambled? First I suggest you try complete your task in offline (using demod11.exe). If you really want to do in realtime, you can try:

    a. Kernel: sends a message to the kernel debugger: for example KdPrint

    b. Kernel: write to a file: for example ZwCreateFile

    c. User mode extension(UMX): break into debugger and check

     

    (2) After extracting the input data value of baseband, I wanna simulate the baseband process in the visual studio, how can I debug the srouce code in the visual studio in the realtime communication or offline test?

     

    If you choose offline test binary "demod11.exe", you can attach your debugger (Visual Studio or WinDbg) to the process, or just add "__asm int 3;" in source code to invoke debugger.

    If you try realtime test, you can see item c in above answer.

    (3) I notice that the machine will be slow down when the modified softWifi driver are loaded, Why it happened? For example, I add the print function in the kennel mode, the machine will be slow down. Can you tell me the reason?

     

    I don not exactly understand your modification. If you just add kernel debug output (KdPrint?), and if the output is quite frequent, of course it will slow down.

     

    I am new user of Sora station, even your single short comment will be grateful and helpful to me,Thank you in advance.


    • Marked as answer by Qi LuoEditor Thursday, December 29, 2011 7:07 AM
    Monday, December 26, 2011 11:53 AM
    Answerer
  • Thank you for your useful answer, Qi Luo. That will be helpful to me.

    There is another question about this topic.Hope you or other people can help me.

    I wanna compile the source codes of demod.exe or UMX in the visual studio incuding the windows driver kits (WDK). But there appears lots of error in the stdio.h, ctype.h or the *.h in the WDK. I knew that the build (BCZ) cmd command in the WDK can perfectly do the compilation. But as to my research topic, I have to compile them in the visual studio. The question is how can I solve this problem? Is it possible to complie the driver in the visual studio?

    Thank you for your attention and kindly reply in advance.

     

    Wednesday, December 28, 2011 2:15 AM
  • if you wanna compile demod.exe or umx in VS, then that's easy. 

    Just create a win32 console application, add the source files in the solution. then, include usora.lib in the project, include header files of sora. finally, compile the solution.

    if you wanna compile sora driver in vs, then it's a little bit complicated.

    first, you need create a blank solution (not win32), then you should specify a Makefile and a command in which you should invoke build to compile the source files. Then, specify the command in vs. From my personal experiences, I suggest that you write your code in vs taking advantage of code auto completion and keywords coloring, and compile your code using bcz or bz in command.

    if you are familiar with the extension of VS "Visual DDK", then it's much simpler. you can write compile all your sora code in VS just like a win32 app. 


    Danial.F
    Monday, January 2, 2012 4:43 PM
  • Thank you for your reply, Danial.F.

    I tried your method your said and compile the umxexample.c with the IDE template Visual DDK. But I still have two errors cannot be solved.

     

    1>------ project: sora_visualddk, configuration: Debug Win32 ------
    1>Linking...
    1>usora.lib(_scheduler_u.obj) : warning LNK4217: symbol   _malloc " defined in local is imported from the functon _insert_tail@8

    1>usora.lib(_scheduler_u.obj) : warning LNK4217: symbol  "_free" defined in local is imported from the functon _remove_head@8

    1>LINK : error LNK2001: unresolved external symbol  _DriverEntry
    1>usora.lib(_scheduler_u.obj) : error LNK2019:  unresolved external symbol  __imp___beginthreadex, this symbol is refered in the function _SoraThreadStart@12 1>D:\SDR\wifi\sora\sora_visualddk\sora_visualddk\Debug\sora_visualddk.sys : fatal error LNK1120: 2  unresolved external symbol
    1>saved as “file://d:\SDR\wifi\sora\sora_visualddk\sora_visualddk\Debug\BuildLog.htm”
    1>sora_visualddk - 3 errors,2 warnings

    The driverEntry is the entry of driver in the link option, property of the project. And SoraThreadStart is a function in the umxexample.c. I cannot find the definition of the function as it is integrated into the usora.lib. How can I solve these problems? Hope for helpful answer.Thank you in advance.

    Tuesday, January 10, 2012 7:00 AM
  • Hi, you should use ksora.lib to compile kernel mode sora driver.
    Danial.F
    Sunday, January 15, 2012 12:08 PM